[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-btrfs
Subject:    Re: [PATCH v2] btrfs: ioctl: allow dev info ioctl to return fsid of a device
From:       David Sterba <dsterba () suse ! cz>
Date:       2023-02-27 18:56:11
Message-ID: 20230227185611.GI10580 () twin ! jikos ! cz
[Download RAW message or body]

On Fri, Feb 24, 2023 at 11:59:01AM +0800, Anand Jain wrote:
> 
> > Signed-off-by: Qu Wenruo <wqu@suse.com>
> 
> I was uncertain whether we needed this patch, as the sysfs already
> provides fsid. Nevertheless, it looks good

The sysfs and ioctl overlap in the provided information and we can
extend them in both was as needed. The sysfs files are universal and
often targeting shell scripts, the ioctls are for programatic use.

> Reviewed-by: Anand Jain <anand.jain@oracle.com>
> 
> Small nit below.
> 
> 
> > diff --git a/include/uapi/linux/btrfs.h b/include/uapi/linux/btrfs.h
> > index b4f0f9531119..cbb22dbdd108 100644
> > --- a/include/uapi/linux/btrfs.h
> > +++ b/include/uapi/linux/btrfs.h
> > @@ -245,7 +245,18 @@ struct btrfs_ioctl_dev_info_args {
> >   	__u8 uuid[BTRFS_UUID_SIZE];		/* in/out */
> >   	__u64 bytes_used;			/* out */
> >   	__u64 total_bytes;			/* out */
> > -	__u64 unused[379];			/* pad to 4k */
> > +	/*
> > +	 * Optional, out.
> > +	 *
> > +	 * Showing the fsid of the device, allowing user space
> > +	 * to check if this device is a seed one.
> > +	 *
> > +	 * Introduced in v6.4, thus user space still needs to
> 
>                           ^ v6.3
> It looks like this will go into v6.3, so it should be fixed while merging.

Fixed in the committed version.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic