Re: [PATCH] NFS: allow name_to_handle_at() to work for Amazon EFS.

2017-12-20 Thread NeilBrown
On Tue, Dec 19 2017, Jan Kara wrote: > On Fri 08-12-17 13:17:31, NeilBrown wrote: >> On Thu, Dec 07 2017, Amir Goldstein wrote: >> >> > On Thu, Dec 7, 2017 at 5:20 AM, NeilBrown wrote: >> >> On Wed, Dec 06 2017, Linus Torvalds wrote: >> >> >> >>> On Thu, Nov 30, 2017 at 12:56 PM, NeilBrown wrot

Re: [PATCH] NFS: allow name_to_handle_at() to work for Amazon EFS.

2017-12-19 Thread Jan Kara
On Fri 08-12-17 13:17:31, NeilBrown wrote: > On Thu, Dec 07 2017, Amir Goldstein wrote: > > > On Thu, Dec 7, 2017 at 5:20 AM, NeilBrown wrote: > >> On Wed, Dec 06 2017, Linus Torvalds wrote: > >> > >>> On Thu, Nov 30, 2017 at 12:56 PM, NeilBrown wrote: > > -/* limit the handle size to

Re: [PATCH] NFS: allow name_to_handle_at() to work for Amazon EFS.

2017-12-07 Thread NeilBrown
On Thu, Dec 07 2017, Amir Goldstein wrote: > On Thu, Dec 7, 2017 at 5:20 AM, NeilBrown wrote: >> On Wed, Dec 06 2017, Linus Torvalds wrote: >> >>> On Thu, Nov 30, 2017 at 12:56 PM, NeilBrown wrote: -/* limit the handle size to NFSv4 handle size now */ -#define MAX_HANDLE_SZ 128 >>

Re: [PATCH] NFS: allow name_to_handle_at() to work for Amazon EFS.

2017-12-06 Thread Matthew Wilcox
On Thu, Dec 07, 2017 at 02:20:05PM +1100, NeilBrown wrote: > We can allocate in fs/notify/fdinfo.c:show_fdinfo() which is > the earliest 'notify' specific code to run. There is no > opportunity to return an error but GFP_KERNEL allocations under 1 page > never fail.. "never" * The default alloc

Re: [PATCH] NFS: allow name_to_handle_at() to work for Amazon EFS.

2017-12-06 Thread Amir Goldstein
On Thu, Dec 7, 2017 at 5:20 AM, NeilBrown wrote: > On Wed, Dec 06 2017, Linus Torvalds wrote: > >> On Thu, Nov 30, 2017 at 12:56 PM, NeilBrown wrote: >>> >>> -/* limit the handle size to NFSv4 handle size now */ >>> -#define MAX_HANDLE_SZ 128 >>> +/* Must be larger than NFSv4 file handle, but sma

Re: [PATCH] NFS: allow name_to_handle_at() to work for Amazon EFS.

2017-12-06 Thread NeilBrown
On Wed, Dec 06 2017, Linus Torvalds wrote: > On Thu, Nov 30, 2017 at 12:56 PM, NeilBrown wrote: >> >> -/* limit the handle size to NFSv4 handle size now */ >> -#define MAX_HANDLE_SZ 128 >> +/* Must be larger than NFSv4 file handle, but small >> + * enough for an on-stack allocation. overlayfs doe

Re: [PATCH] NFS: allow name_to_handle_at() to work for Amazon EFS.

2017-12-06 Thread Linus Torvalds
On Thu, Nov 30, 2017 at 12:56 PM, NeilBrown wrote: > > -/* limit the handle size to NFSv4 handle size now */ > -#define MAX_HANDLE_SZ 128 > +/* Must be larger than NFSv4 file handle, but small > + * enough for an on-stack allocation. overlayfs doesn't > + * want this too close to 255. > + */ > +#d

Re: [PATCH] NFS: allow name_to_handle_at() to work for Amazon EFS.

2017-12-06 Thread J. Bruce Fields
On Fri, Dec 01, 2017 at 07:56:38AM +1100, NeilBrown wrote: > > Amazon EFS provides an NFSv4.1 filesystem which appears to use > (close to) full length (128 byte) file handles. I wonder why? Anyway, it seems unfortunate that systemd should need to worry about filehandle sizes at all, given that

[PATCH] NFS: allow name_to_handle_at() to work for Amazon EFS.

2017-11-30 Thread NeilBrown
Amazon EFS provides an NFSv4.1 filesystem which appears to use (close to) full length (128 byte) file handles. This causes the handle reported by name_to_handle_at() to exceed MAX_HANDLE_SZ, resulting in EOVERFLOW if 128 bytes were requested, or EINVAL if the size reported by the previous call