On Mon, Nov 14, 2016 at 09:22:22AM +0800, Qu Wenruo wrote: > > > At 11/14/2016 03:35 AM, Omar Sandoval wrote: > > From: Omar Sandoval <osandov@xxxxxx> > > > > If this flag is passed to open_ctree(), we'll clear the > > FREE_SPACE_TREE_VALID compat_ro bit. The kernel will then reconstruct > > the free space tree the next time the filesystem is mounted. > > This feature is really helpful. > > Especially for users reporting failed to mount v2 space_cache fs. > > Despite a small nit commented below, feel free to add my reviewed by tag. > > Reviewed-by: Qu Wenruo <quwenruo@xxxxxxxxxxxxxx> > > > > Signed-off-by: Omar Sandoval <osandov@xxxxxx> > > --- > > chunk-recover.c | 2 +- > > disk-io.c | 28 ++++++++++++++++++---------- > > disk-io.h | 8 +++++++- > > 3 files changed, 26 insertions(+), 12 deletions(-) > > > > diff --git a/chunk-recover.c b/chunk-recover.c > > index e33ee8b..e6b26ac 100644 > > --- a/chunk-recover.c > > +++ b/chunk-recover.c > > @@ -1477,7 +1477,7 @@ open_ctree_with_broken_chunk(struct recover_control *rc) > > > > memcpy(fs_info->fsid, &disk_super->fsid, BTRFS_FSID_SIZE); > > > > - ret = btrfs_check_fs_compatibility(disk_super, 1); > > + ret = btrfs_check_fs_compatibility(disk_super, OPEN_CTREE_WRITES); > > if (ret) > > goto out_devices; > > > > diff --git a/disk-io.c b/disk-io.c > > index a576300..a55fcc1 100644 > > --- a/disk-io.c > > +++ b/disk-io.c > > @@ -904,7 +904,7 @@ free_all: > > return NULL; > > } > > > > -int btrfs_check_fs_compatibility(struct btrfs_super_block *sb, int writable) > > +int btrfs_check_fs_compatibility(struct btrfs_super_block *sb, unsigned flags) > > IIRC kernel checkpatch will warn on single "unsigned", as it's recommended > to use "unsigned int". > > Thanks, > Qu I was going for consistency with the rest of disk-io.c, but I can fix it. Thanks! -- Omar -- 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
