All of lore.kernel.org
 help / color / mirror / Atom feed
* [Cluster-devel] [GFS2 PATCH] gfs2: getlabel support
@ 2018-08-21  3:21 Abhi Das
  2018-08-21  9:03 ` Andrew Price
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Abhi Das @ 2018-08-21  3:21 UTC (permalink / raw)
  To: cluster-devel.redhat.com

Add support for the GETFSLABEL ioctl in gfs2.
I tested this patch and it works as expected.

Signed-off-by: Steve Whitehouse <swhiteho@redhat.com>
Tested-by: Abhi Das <adas@redhat.com>
---
 fs/gfs2/file.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c
index 08369c6..6510f4e 100644
--- a/fs/gfs2/file.c
+++ b/fs/gfs2/file.c
@@ -314,6 +314,17 @@ static int gfs2_set_flags(struct file *filp, u32 __user *ptr)
 	return do_gfs2_set_flags(filp, gfsflags, mask);
 }
 
+static int gfs2_getlabel(struct file *filp, char __user *label)
+{
+	struct inode *inode = file_inode(filp);
+	struct gfs2_sbd *sdp = GFS2_SB(inode);
+
+	if (copy_to_user(label, sdp->sd_sb.sb_locktable, GFS2_LOCKNAME_LEN))
+		return -EFAULT;
+
+	return 0;
+}
+
 static long gfs2_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
 {
 	switch(cmd) {
@@ -323,7 +334,10 @@ static long gfs2_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
 		return gfs2_set_flags(filp, (u32 __user *)arg);
 	case FITRIM:
 		return gfs2_fitrim(filp, (void __user *)arg);
+	case FS_IOC_GETFSLABEL:
+		return gfs2_getlabel(filp, (char __user *)arg);
 	}
+
 	return -ENOTTY;
 }
 
-- 
2.4.11



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Cluster-devel] [GFS2 PATCH] gfs2: getlabel support
  2018-08-21  3:21 [Cluster-devel] [GFS2 PATCH] gfs2: getlabel support Abhi Das
@ 2018-08-21  9:03 ` Andrew Price
  2018-08-21 12:07 ` Bob Peterson
  2018-10-08 20:07 ` Bob Peterson
  2 siblings, 0 replies; 4+ messages in thread
From: Andrew Price @ 2018-08-21  9:03 UTC (permalink / raw)
  To: cluster-devel.redhat.com

On 21/08/18 04:21, Abhi Das wrote:
> Add support for the GETFSLABEL ioctl in gfs2.
> I tested this patch and it works as expected.
> 
> Signed-off-by: Steve Whitehouse <swhiteho@redhat.com>
> Tested-by: Abhi Das <adas@redhat.com>

The message should probably start with a From: so that git am uses the 
correct author. Looks good otherwise.

Cheers,
Andy

> ---
>   fs/gfs2/file.c | 14 ++++++++++++++
>   1 file changed, 14 insertions(+)
> 
> diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c
> index 08369c6..6510f4e 100644
> --- a/fs/gfs2/file.c
> +++ b/fs/gfs2/file.c
> @@ -314,6 +314,17 @@ static int gfs2_set_flags(struct file *filp, u32 __user *ptr)
>   	return do_gfs2_set_flags(filp, gfsflags, mask);
>   }
>   
> +static int gfs2_getlabel(struct file *filp, char __user *label)
> +{
> +	struct inode *inode = file_inode(filp);
> +	struct gfs2_sbd *sdp = GFS2_SB(inode);
> +
> +	if (copy_to_user(label, sdp->sd_sb.sb_locktable, GFS2_LOCKNAME_LEN))
> +		return -EFAULT;
> +
> +	return 0;
> +}
> +
>   static long gfs2_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
>   {
>   	switch(cmd) {
> @@ -323,7 +334,10 @@ static long gfs2_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
>   		return gfs2_set_flags(filp, (u32 __user *)arg);
>   	case FITRIM:
>   		return gfs2_fitrim(filp, (void __user *)arg);
> +	case FS_IOC_GETFSLABEL:
> +		return gfs2_getlabel(filp, (char __user *)arg);
>   	}
> +
>   	return -ENOTTY;
>   }
>   
> 



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Cluster-devel] [GFS2 PATCH] gfs2: getlabel support
  2018-08-21  3:21 [Cluster-devel] [GFS2 PATCH] gfs2: getlabel support Abhi Das
  2018-08-21  9:03 ` Andrew Price
@ 2018-08-21 12:07 ` Bob Peterson
  2018-10-08 20:07 ` Bob Peterson
  2 siblings, 0 replies; 4+ messages in thread
From: Bob Peterson @ 2018-08-21 12:07 UTC (permalink / raw)
  To: cluster-devel.redhat.com

----- Original Message -----
> Add support for the GETFSLABEL ioctl in gfs2.
> I tested this patch and it works as expected.
> 
> Signed-off-by: Steve Whitehouse <swhiteho@redhat.com>
> Tested-by: Abhi Das <adas@redhat.com>
> ---

Hi Abhi,

I'll queue this up, but as with the other recent patches, I won't
push it until this merge window is closed.

Regards,

Bob Peterson



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Cluster-devel] [GFS2 PATCH] gfs2: getlabel support
  2018-08-21  3:21 [Cluster-devel] [GFS2 PATCH] gfs2: getlabel support Abhi Das
  2018-08-21  9:03 ` Andrew Price
  2018-08-21 12:07 ` Bob Peterson
@ 2018-10-08 20:07 ` Bob Peterson
  2 siblings, 0 replies; 4+ messages in thread
From: Bob Peterson @ 2018-10-08 20:07 UTC (permalink / raw)
  To: cluster-devel.redhat.com

----- Original Message -----
> Add support for the GETFSLABEL ioctl in gfs2.
> I tested this patch and it works as expected.
> 
> Signed-off-by: Steve Whitehouse <swhiteho@redhat.com>
> Tested-by: Abhi Das <adas@redhat.com>
> ---

Hi,

Thanks. This is now pushed to the for-next branch of the linux-gfs2 tree:
https://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git/commit/fs/gfs2?h=for-next&id=a77341292dd65e4807301988e027063156939dfd

Regards,

Bob Peterson
Red Hat File Systems



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-10-08 20:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-21  3:21 [Cluster-devel] [GFS2 PATCH] gfs2: getlabel support Abhi Das
2018-08-21  9:03 ` Andrew Price
2018-08-21 12:07 ` Bob Peterson
2018-10-08 20:07 ` Bob Peterson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.