On fri, 3 Jan 2014 18:52:44 +0100, David Sterba wrote:
On Fri, Jan 03, 2014 at 02:10:30PM +0800, Qu Wenruo wrote:
Add noinode_cache mount option to disable inode map cache with
remount option.
This looks almost safe, there's a sync_filesystem called before the
filesystem's remount handler, the transaction gets committed and flushes
all tha data related to inode_cache.
The caching thread keeps running, which is not a serious problem as
it'll finish at umount time, only consuming resources.
There's a window between sync_filesystem and successful remount when the
INODE_MAP_CACHE bit is set and the cache could be used to get a free ino,
then the INODE_MAP_CACHE is cleared but the ino cache remains is not
synced back to disk, normally called from transaction commit via
btrfs_unpin_free_ino. I haven't looked if something else blocks that to
happen.
I'd leave this patch out for now, it probably needs more code updates
than just unsetting the bit.
david
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Thanks for pointing out the hidden problem.
I'll check the related source again to keep this behavior safe or
add new codes.
So in next patchset, the inode map cache option will not be included
and will be seperated to a new patch.
Qu
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html