Re: [RFC PATCH v7 1/2] Btrfs: Add a new ioctl to get the label of a mounted file system

2012-12-24 Thread Jeff Liu
On 12/22/2012 01:36 AM, Goffredo Baroncelli wrote: On 12/21/2012 07:42 AM, Jeff Liu wrote: Hi Goffredo, On 12/21/2012 04:18 AM, Goffredo Baroncelli wrote: HI Jeff, On 12/20/2012 09:43 AM, Jeff Liu wrote: With the new ioctl(2) BTRFS_IOC_GET_FSLABEL we can fetch the label of a mounted file

Re: [RFC PATCH v7 1/2] Btrfs: Add a new ioctl to get the label of a mounted file system

2012-12-24 Thread Goffredo Baroncelli
Hi Jeff, On 12/24/2012 09:07 AM, Jeff Liu wrote: On 12/22/2012 01:36 AM, Goffredo Baroncelli wrote: On 12/21/2012 07:42 AM, Jeff Liu wrote: [...] I don't think we should replace strlen() with strnlen() since it's totally wrong if the length of label is more than BTRFS_LABEL_SIZE -1, we can

Re: [RFC PATCH v7 1/2] Btrfs: Add a new ioctl to get the label of a mounted file system

2012-12-24 Thread Jeff Liu
On 12/24/2012 09:46 PM, Goffredo Baroncelli wrote: Hi Jeff, On 12/24/2012 09:07 AM, Jeff Liu wrote: On 12/22/2012 01:36 AM, Goffredo Baroncelli wrote: On 12/21/2012 07:42 AM, Jeff Liu wrote: [...] I don't think we should replace strlen() with strnlen() since it's totally wrong if the

Re: [RFC PATCH v7 1/2] Btrfs: Add a new ioctl to get the label of a mounted file system

2012-12-21 Thread Stefan Behrens
On 12/21/2012 07:42, Jeff Liu wrote: On 12/21/2012 04:18 AM, Goffredo Baroncelli wrote: On 12/20/2012 09:43 AM, Jeff Liu wrote: +static int btrfs_ioctl_get_fslabel(struct file *file, void __user *arg) +{ + struct btrfs_root *root = BTRFS_I(fdentry(file)-d_inode)-root; + const char

Re: [RFC PATCH v7 1/2] Btrfs: Add a new ioctl to get the label of a mounted file system

2012-12-21 Thread Goffredo Baroncelli
On 12/21/2012 07:42 AM, Jeff Liu wrote: Hi Goffredo, On 12/21/2012 04:18 AM, Goffredo Baroncelli wrote: HI Jeff, On 12/20/2012 09:43 AM, Jeff Liu wrote: With the new ioctl(2) BTRFS_IOC_GET_FSLABEL we can fetch the label of a mounted file system. Signed-off-by: Jie Liu

[RFC PATCH v7 1/2] Btrfs: Add a new ioctl to get the label of a mounted file system

2012-12-20 Thread Jeff Liu
With the new ioctl(2) BTRFS_IOC_GET_FSLABEL we can fetch the label of a mounted file system. Signed-off-by: Jie Liu jeff@oracle.com Signed-off-by: Anand Jain anand.j...@oracle.com Cc: Miao Xie mi...@cn.fujitsu.com Cc: Goffredo Baroncelli kreij...@inwind.it Cc: David Sterba dste...@suse.cz

Re: [RFC PATCH v7 1/2] Btrfs: Add a new ioctl to get the label of a mounted file system

2012-12-20 Thread Goffredo Baroncelli
HI Jeff, On 12/20/2012 09:43 AM, Jeff Liu wrote: With the new ioctl(2) BTRFS_IOC_GET_FSLABEL we can fetch the label of a mounted file system. Signed-off-by: Jie Liu jeff@oracle.com Signed-off-by: Anand Jain anand.j...@oracle.com Cc: Miao Xie mi...@cn.fujitsu.com Cc: Goffredo

Re: [RFC PATCH v7 1/2] Btrfs: Add a new ioctl to get the label of a mounted file system

2012-12-20 Thread Jeff Liu
Hi Goffredo, On 12/21/2012 04:18 AM, Goffredo Baroncelli wrote: HI Jeff, On 12/20/2012 09:43 AM, Jeff Liu wrote: With the new ioctl(2) BTRFS_IOC_GET_FSLABEL we can fetch the label of a mounted file system. Signed-off-by: Jie Liu jeff@oracle.com Signed-off-by: Anand Jain