Re: [RFC PATCH 5/5] gfs2: Add xreaddir file operation and supporting functions

2014-07-30 Thread Jonathan Corbet
On Tue, 29 Jul 2014 18:25:57 -0400 (EDT) Abhijith Das wrote: > > > + if ((xc->xc_xattr_mask & XSTAT_XATTR_ALL) && > > > + lxd->xd_blob.xb_xattr_count) { > > > > How can that be right? lxd is __user, it doesn't seem right to be > > dereferencing it directly...? > > Wouldn't the

Re: [RFC PATCH 5/5] gfs2: Add xreaddir file operation and supporting functions

2014-07-30 Thread Jonathan Corbet
On Tue, 29 Jul 2014 18:25:57 -0400 (EDT) Abhijith Das a...@redhat.com wrote: + if ((xc-xc_xattr_mask XSTAT_XATTR_ALL) + lxd-xd_blob.xb_xattr_count) { How can that be right? lxd is __user, it doesn't seem right to be dereferencing it directly...? Wouldn't the call to

Re: [RFC PATCH 5/5] gfs2: Add xreaddir file operation and supporting functions

2014-07-29 Thread Abhijith Das
- Original Message - > From: "Jonathan Corbet" > To: "Abhi Das" > Cc: linux-kernel@vger.kernel.org, linux-fsde...@vger.kernel.org, > cluster-de...@redhat.com > Sent: Tuesday, July 29, 2014 1:58:08 PM > Subject: Re: [RFC PATCH 5/5] gfs2: Add

Re: [RFC PATCH 5/5] gfs2: Add xreaddir file operation and supporting functions

2014-07-29 Thread Jonathan Corbet
On Fri, 25 Jul 2014 12:38:08 -0500 Abhi Das wrote: > This patch adds support in GFS2 for the xgetdents syscall by > implementing the xreaddir file operation. So I was trying to make sense of this, and ran into one little thing that jumped out at me: > +static int gfs2_xrdir_to_user_vars(struct

Re: [RFC PATCH 5/5] gfs2: Add xreaddir file operation and supporting functions

2014-07-29 Thread Jonathan Corbet
On Fri, 25 Jul 2014 12:38:08 -0500 Abhi Das a...@redhat.com wrote: This patch adds support in GFS2 for the xgetdents syscall by implementing the xreaddir file operation. So I was trying to make sense of this, and ran into one little thing that jumped out at me: +static int

Re: [RFC PATCH 5/5] gfs2: Add xreaddir file operation and supporting functions

2014-07-29 Thread Abhijith Das
- Original Message - From: Jonathan Corbet cor...@lwn.net To: Abhi Das a...@redhat.com Cc: linux-kernel@vger.kernel.org, linux-fsde...@vger.kernel.org, cluster-de...@redhat.com Sent: Tuesday, July 29, 2014 1:58:08 PM Subject: Re: [RFC PATCH 5/5] gfs2: Add xreaddir file operation

[RFC PATCH 5/5] gfs2: Add xreaddir file operation and supporting functions

2014-07-25 Thread Abhi Das
This patch adds support in GFS2 for the xgetdents syscall by implementing the xreaddir file operation. GFS2 uses vbufs (buffer backed by a vector of pages) to store intermediate data like dirents, stat info and extended attribute keys/values to eventually bundle them into a container structure to

[RFC PATCH 5/5] gfs2: Add xreaddir file operation and supporting functions

2014-07-25 Thread Abhi Das
This patch adds support in GFS2 for the xgetdents syscall by implementing the xreaddir file operation. GFS2 uses vbufs (buffer backed by a vector of pages) to store intermediate data like dirents, stat info and extended attribute keys/values to eventually bundle them into a container structure to