On Thu, Jul 24, 2014 at 11:37:08AM +0800, Miao Xie wrote:
> All the metadata in the seed devices has the same fsid as the fsid
> of the seed filesystem which is on the seed device, so we should check
> them by the current filesystem. Fix it.
> 
> Signed-off-by: Miao Xie <mi...@cn.fujitsu.com>

Reviewed-by: David Sterba <dste...@suse.cz>

> ---
>  fs/btrfs/scrub.c | 18 +++++++++++++-----
>  1 file changed, 13 insertions(+), 5 deletions(-)
> 
> diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
> index 23d3f6e..9a81874e 100644
> --- a/fs/btrfs/scrub.c
> +++ b/fs/btrfs/scrub.c
> @@ -1361,6 +1361,16 @@ static void scrub_recheck_block(struct btrfs_fs_info 
> *fs_info,
>       return;
>  }
>  
> +static inline int scrub_check_fsid(u8 fsid[],

Please use 'const u8 *fsid' type.

> +                                struct scrub_page *spage)
> +{
> +     struct btrfs_fs_devices *fs_devices = spage->dev->fs_devices;
> +     int ret;
> +
> +     ret = memcmp(fsid, fs_devices->fsid, BTRFS_UUID_SIZE);

ret is not necessary

> +     return !ret;
> +}
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to