Re: [PATCH 0/4] locks: avoid thundering-herd wake-ups

2018-08-20 Thread J. Bruce Fields
On Mon, Aug 20, 2018 at 01:02:21PM +0200, Martin Wilck wrote: > On Wed, 2018-08-08 at 14:29 -0400, J. Bruce Fields wrote: > > On Wed, Aug 08, 2018 at 12:47:22PM -0400, Jeff Layton wrote: > > > On Wed, 2018-08-08 at 11:51 +1000, NeilBrown wrote: > > > > If you have

Re: [LKP] [fs/locks] fd7732e033: stress-ng.eventfd.ops 21.9% improvement

2018-12-11 Thread J. Bruce Fields
On Tue, Dec 11, 2018 at 05:14:29PM +0800, kernel test robot wrote: > FYI, we noticed a 21.9% improvement of stress-ng.eventfd.ops due to commit: So, doesn't sound like a problem, but just looking into it out of curiosity. I love that you do this, but these reports can be hard to figure out so

Re: [PATCH 01/20] nfsd: drop useless LIST_HEAD

2018-12-23 Thread J. Bruce Fields
Applied, thanks.--b. On Sun, Dec 23, 2018 at 09:56:56AM +0100, Julia Lawall wrote: > Drop LIST_HEAD where the variable it declares is never used. > > This was introduced in c5c707f96fc9a ("nfsd: implement pNFS > layout recalls"), but was not used even in that commit. > > The semantic patch that

[GIT PULL] nfsd

2019-01-02 Thread J. Bruce Fields
, increase indentation in switch statement J. Bruce Fields (6): nfsd4: zero-length WRITE should succeed nfsd4: remove unused nfs4_check_olstateid parameter nfsd4: forbid all renames during grace period nfsd4: skip unused assignment lockd: fix decoding of TEST results

[GIT PULL] nfsd changes for 4.20

2018-10-30 Thread J. Bruce Fields
Please pull nfsd changes for 4.20: git://linux-nfs.org/~bfields/linux.git tags/nfsd-4.20 Olga added support for the NFSv4.2 asynchronous copy protocol. We already supported COPY, by copying a limited amount of data and then returning a short result, letting the client resend. The asynchronous

Re: [GIT PULL] nfsd changes for 4.20

2018-10-31 Thread J. Bruce Fields
On Tue, Oct 30, 2018 at 01:06:58PM -0700, Linus Torvalds wrote: > On Tue, Oct 30, 2018 at 12:55 PM Linus Torvalds > wrote: > > > > Pulled, > > Oh, I take that back. Semantic conflict with locking name change > (recv_lock -> queue_lock) and new code in > >net/sunrpc/xprtrdma/svc_rdma_backchan

Re: [PATCH 01/12] fs/locks: rename some lists and pointers.

2018-11-08 Thread J. Bruce Fields
On Mon, Nov 05, 2018 at 12:30:47PM +1100, NeilBrown wrote: > struct file lock contains an 'fl_next' pointer which > is used to point to the lock that this request is blocked > waiting for. So rename it to fl_blocker. > > The fl_blocked list_head in an active lock is the head of a list of > blocke

Re: [PATCH 10/12] fs/locks: create a tree of dependent requests.

2018-11-08 Thread J. Bruce Fields
On Mon, Nov 05, 2018 at 12:30:48PM +1100, NeilBrown wrote: > When we find an existing lock which conflicts with a request, > and the request wants to wait, we currently add the request > to a list. When the lock is removed, the whole list is woken. > This can cause the thundering-herd problem. > T

Re: [PATCH 00/12] Series short description

2018-11-08 Thread J. Bruce Fields
On Mon, Nov 05, 2018 at 12:30:47PM +1100, NeilBrown wrote: > Here is the respin on this series with the file_lock properly > initlized for unlock requests. > I found one that I had missed before - in locks_remove_flock() > The change makes this code smaller! > > Original series description: > > I

Re: [PATCH] nfsd: fix fall-through annotations

2018-10-03 Thread J. Bruce Fields
Thanks, applying.--b. On Tue, Oct 02, 2018 at 12:08:48PM +0200, Gustavo A. R. Silva wrote: > Replace "fallthru" with a proper "fall through" annotation. > > Also, add an annotation were it is expected to fall through. > > These fixes are part of the ongoing efforts to enabling > -Wimplicit-fallt

Re: [PATCH 0/9 v3] locks: avoid thundering-herd wake-ups

2018-10-25 Thread J. Bruce Fields
On Wed, Oct 24, 2018 at 09:43:54AM +1100, NeilBrown wrote: > This took longer that I had wanted, due to various reasons - sorry. > And I'm now posting it in a merge window, which is not ideal. I don't > expect it to be included in this merge window and I won't be at all > impatient for review, but

Re: KASAN: slab-out-of-bounds Read in string (2)

2018-10-25 Thread J. Bruce Fields
On Thu, Oct 25, 2018 at 06:17:25PM +0300, Amir Goldstein wrote: > On Thu, Oct 25, 2018 at 6:02 PM Bruce Fields wrote: > > > > > So I guess it has fallen between the cracks. > > > > Feel free to send a patch to Jeff. > > > > > > > > Thanks, > > > > Amir. > > > > > > Actually, this should probably

Re: [PATCH] nfsd: fix memory leak of async_copy

2018-07-17 Thread J . Bruce Fields
Cc'ing Olga.--b. On Tue, Jul 17, 2018 at 10:33:59AM +0100, Colin Ian King wrote: > On 17/07/18 10:30, Dan Carpenter wrote: > > On Mon, Jul 16, 2018 at 01:09:54PM +0100, Colin King wrote: > >> From: Colin Ian King > >> > >> In the case where async_copy is successfully allocated but > >> the call t

Re: [PATCH] SUNRPC: Add a check for gss_release_msg

2021-04-20 Thread J. Bruce Fields
On Tue, Apr 20, 2021 at 09:15:23AM +0200, Greg KH wrote: > If you look at the code, this is impossible to have happen. > > Please stop submitting known-invalid patches. Your professor is playing > around with the review process in order to achieve a paper in some > strange and bizarre way. > > T

Re: [PATCH] SUNRPC: Add a check for gss_release_msg

2021-04-07 Thread J. Bruce Fields
On Tue, Apr 06, 2021 at 07:16:56PM -0500, Aditya Pakki wrote: > In gss_pipe_destroy_msg(), in case of error in msg, gss_release_msg > deletes gss_msg. The patch adds a check to avoid a potential double > free. We're already dereferenced msg. Nothing has set gss_msg to NULL. It's the gss_msg->cou

Re: NFS4 authentification / fsuid

2007-09-07 Thread J. Bruce Fields
On Fri, Sep 07, 2007 at 01:32:52AM +0200, Trond Myklebust wrote: > Sorry. Of course, you have to copy the entire /lib, etc. onto the tmpfs, > but you get the gist > > The point is that it is easy to subvert userspace if you have enough > privileges. In the above example it may not be entirely

Re: [BUG] 2.6.23-rc5 kernel BUG at fs/nfs/nfs4xdr.c:945

2007-09-07 Thread J. Bruce Fields
On Fri, Sep 07, 2007 at 03:32:32PM +0530, Kamalesh Babulal wrote: > Sep 7 11:42:49 p55lp2 kernel: kernel BUG at fs/nfs/nfs4xdr.c:945! That's the first line of encode_lookup: static int encode_lookup(struct xdr_stream *xdr, const struct qstr *name) { int len = nam

Re: [NFSv4] 2.6.23-rc4 oops in nfs4_cb_recall...

2007-09-09 Thread J. Bruce Fields
> When accessing a directory inode from a single other client, NFSv4 > callbacks catastrophically failed [1] on the NFS server with > 2.6.23-rc4 (unpatched); clients are both 2.6.22 (Ubuntu Gutsy build). > Seems not easy to reproduce, since this kernel was running smoothly > for 7 days on the serve

[PATCH] dcache: trivial comment fix

2007-09-10 Thread J. Bruce Fields
As it stands this comment is confusing, and not quite grammatical. Signed-off-by: J. Bruce Fields <[EMAIL PROTECTED]> --- fs/dcache.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/dcache.c b/fs/dcache.c index 678d39d..2bacdf6 100644 --- a/fs/dcache.c ++

Re: [PATCH] dcache: trivial comment fix

2007-09-10 Thread J. Bruce Fields
On Mon, Sep 10, 2007 at 02:46:32PM -0400, J. Bruce Fields wrote: > * This forceful removal will result in ugly /proc output if > * somebody holds a file open that got deleted due to a rename. > * We could be nicer about the deleted file, and let it show > - * up under the name it

Re: [PATCH] dcache: trivial comment fix

2007-09-11 Thread J. Bruce Fields
On Tue, Sep 11, 2007 at 07:33:43PM +0200, Neil Brown wrote: > On Monday September 10, [EMAIL PROTECTED] wrote: > > On Mon, Sep 10, 2007 at 02:46:32PM -0400, J. Bruce Fields wrote: > > > * This forceful removal will result in ugly /proc output if > > > * somebody

Re: [NFS] [patch] sunrpc: make closing of old temporary sockets work (was: problems with lockd in 2.6.22.6)

2007-09-12 Thread J. Bruce Fields
On Wed, Sep 12, 2007 at 02:07:10PM +0200, Wolfgang Walter wrote: > as already described old temporary sockets (client is gone) of lockd aren't > closed after some time. So, with enough clients and some time gone, there > are 80 open dangling sockets and you start getting messages of the form: > >

Re: [NFS] [patch] sunrpc: make closing of old temporary sockets work (was: problems with lockd in 2.6.22.6)

2007-09-12 Thread J. Bruce Fields
On Wed, Sep 12, 2007 at 09:37:29AM -0400, bfields wrote: > So the fact that this changes the behavior means that sk_inuse is taking > on negative values. Uh, no, I misread the tests, sorry. I'm not awake.--b. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of

Re: [patch] sunrpc: make closing of old temporary sockets work (was: problems with lockd in 2.6.22.6)

2007-09-12 Thread J. Bruce Fields
On Wed, Sep 12, 2007 at 04:14:06PM +0200, Neil Brown wrote: > So it is in 2.6.21 and later and should probably go to .stable for .21 > and .22. > > Bruce: for you :-) OK, thanks! But, (as is alas often the case) I'm still confused: > if (!test_and_set_bit(SK_OLD, &svsk->sk_flags)

Re: [PATCH] Memory shortage can result in inconsistent flocks state

2007-09-12 Thread J. Bruce Fields
On Tue, Sep 11, 2007 at 04:38:13PM +0400, Pavel Emelyanov wrote: > This is a known feature that such "re-locking" is not atomic, > but in the racy case the file should stay locked (although by > some other process), but in this case the file will be unlocked. That's a little subtle (I assume you'v

Re: [patch] sunrpc: make closing of old temporary sockets work (was: problems with lockd in 2.6.22.6)

2007-09-12 Thread J. Bruce Fields
On Wed, Sep 12, 2007 at 09:40:57PM +0200, Wolfgang Walter wrote: > On Wednesday 12 September 2007, J. Bruce Fields wrote: > > On Wed, Sep 12, 2007 at 04:14:06PM +0200, Neil Brown wrote: > > > So it is in 2.6.21 and later and should probably go to .stable for .21 > > >

Re: [NFSv4] 2.6.23-rc4 oops in nfs4_cb_recall...

2007-09-12 Thread J. Bruce Fields
On Mon, Sep 10, 2007 at 03:39:23PM +0100, Daniel J Blueman wrote: > On 09/09/2007, J. Bruce Fields <[EMAIL PROTECTED]> wrote: > > > When accessing a directory inode from a single other client, NFSv4 > > > callbacks catastrophically failed [1] on the NFS server with

Re: [PATCH] Memory shortage can result in inconsistent flocks state

2007-09-13 Thread J. Bruce Fields
On Thu, Sep 13, 2007 at 03:27:08PM -0400, Chuck Ebbert wrote: > On 09/11/2007 08:38 AM, Pavel Emelyanov wrote: > > diff --git a/fs/locks.c b/fs/locks.c > > index 0db1a14..f59d066 100644 > > --- a/fs/locks.c > > +++ b/fs/locks.c > > @@ -732,6 +732,14 @@ static int flock_lock_file(struct file * > >

[PATCH] Correctly close old nfsd/lockd sockets.

2007-09-14 Thread J. Bruce Fields
21-rc1. Thanks to Wolfgang Walter for finding and reporting the bug. Cc: Wolfgang Walter <[EMAIL PROTECTED]> Signed-off-by: Neil Brown <[EMAIL PROTECTED]> Signed-off-by: J. Bruce Fields <[EMAIL PROTECTED]> --- net/sunrpc/svcsock.c |3 ++- 1 files changed, 2 insertions(+), 1

Re: [patch] sunrpc: make closing of old temporary sockets work (was: problems with lockd in 2.6.22.6)

2007-09-14 Thread J. Bruce Fields
On Fri, Sep 14, 2007 at 11:12:30AM +0200, Wolfgang Walter wrote: > Am Mittwoch, 12. September 2007 21:55 schrieb J. Bruce Fields: > > On Wed, Sep 12, 2007 at 09:40:57PM +0200, Wolfgang Walter wrote: > > > On Wednesday 12 September 2007, J. Bruce Fields wrote: > > > >

Re: [2/4] 2.6.23-rc6: known regressions

2007-09-14 Thread J. Bruce Fields
On Wed, Sep 12, 2007 at 06:58:54PM +0200, Michal Piotrowski wrote: > Subject : [NFSv4] 2.6.23-rc4 oops in nfs4_cb_recall > References : http://lkml.org/lkml/2007/9/4/53 > http://bugzilla.kernel.org/show_bug.cgi?id=9003 > Last known good : ? > Submitter : Daniel

Re: Distributed storage. Move away from char device ioctls.

2007-09-14 Thread J. Bruce Fields
On Fri, Sep 14, 2007 at 05:14:53PM -0400, Jeff Garzik wrote: > J. Bruce Fields wrote: >> On Fri, Sep 14, 2007 at 03:07:46PM -0400, Jeff Garzik wrote: >>> I've been waiting for years for a smart person to come along and write a >>> POSIX-only distributed filesyste

Re: Distributed storage. Move away from char device ioctls.

2007-09-14 Thread J. Bruce Fields
On Fri, Sep 14, 2007 at 03:07:46PM -0400, Jeff Garzik wrote: > My thoughts. But first a disclaimer: Perhaps you will recall me as one > of the people who really reads all your patches, and examines your code and > proposals closely. So, with that in mind... > > I question the value of distrib

Re: Distributed storage. Move away from char device ioctls.

2007-09-14 Thread J. Bruce Fields
On Fri, Sep 14, 2007 at 06:32:11PM -0400, Jeff Garzik wrote: > J. Bruce Fields wrote: >> On Fri, Sep 14, 2007 at 05:14:53PM -0400, Jeff Garzik wrote: >>> J. Bruce Fields wrote: >>>> On Fri, Sep 14, 2007 at 03:07:46PM -0400, Jeff Garzik wrote: >>>>> I&#x

Re: Distributed storage. Move away from char device ioctls.

2007-09-14 Thread J. Bruce Fields
On Sat, Sep 15, 2007 at 12:08:42AM -0400, Jeff Garzik wrote: > J. Bruce Fields wrote: >> No, servers are required to support ordinary nfs operations to the >> metadata server. >> At least, that's the way it was last I heard, which was a while ago. I >> agree th

Re: [PATCH] Wake up mandatory locks waiter on chmod

2007-09-16 Thread J. Bruce Fields
On Thu, Sep 13, 2007 at 06:30:43PM +0400, Pavel Emelyanov wrote: > When the process is blocked on mandatory lock and someone changes > the inode's permissions, so that the lock is no longer mandatory, > nobody wakes up the blocked process, but probably should. I suppose so. Does anyone actually u

Re: 2.6.23-rc7-mm1

2007-09-24 Thread J. Bruce Fields
On Mon, Sep 24, 2007 at 09:59:29AM -0700, Andrew Morton wrote: > On Tue, 25 Sep 2007 00:52:30 +1000 Reuben Farrelly <[EMAIL PROTECTED]> wrote: > > > > > > > On 24/09/2007 7:17 PM, Andrew Morton wrote: > > > ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.23-rc7/2.6.23-rc7-mm1/

[PATCH 2/2] locks: add warning about mandatory locking races

2007-09-25 Thread J. Bruce Fields
The mandatory file locking implementation has long-standing races that probably render it useless. I know of no plans to fix them. Till we do, we should at least warn people. Signed-off-by: J. Bruce Fields <[EMAIL PROTECTED]> --- Documentation/filesystems/mandatory-locking.txt

[PATCH 1/2] Documentation: move mandatory locking documentation to filesystems/

2007-09-25 Thread J. Bruce Fields
ilesystems). Signed-off-by: J. Bruce Fields <[EMAIL PROTECTED]> --- On Tue, Sep 18, 2007 at 01:40:16PM -0400, bfields wrote: > Hm. Documentation/mandatory.txt claims that it mandatory locks and > mmap() with MAP_SHARED exclude each other, but I can't see where that's > e

Re: [PATCH 1/2] Documentation: move mandatory locking documentation to filesystems/

2007-09-25 Thread J. Bruce Fields
On Tue, Sep 25, 2007 at 10:12:40AM -0700, Randy Dunlap wrote: > One correction below. ... > > --- a/Documentation/filesystems/00-INDEX > > +++ b/Documentation/filesystems/00-INDEX > > @@ -52,6 +52,8 @@ isofs.txt > > - info and mount options for the ISO 9660 (CDROM) filesystem. > > jfs.txt > >

NFS server development update

2007-09-27 Thread J. Bruce Fields
These days Neil Brown and I are maintaining the NFS server together, and I'm currently (as of the last few weeks) tracking the to-be-submitted patches. I have limited time and am not expert on all of the relevant code, so I depend on your help! I'm still experimenting a bit with the process (sugg

Re: NFS server development update

2007-09-27 Thread J. Bruce Fields
On Thu, Sep 27, 2007 at 11:32:33AM -0400, J. Bruce Fields wrote: > I'll follow up with a summary of the patches I currently have. ... but this time around that's nothing major--mostly just small bugfixes and cleanup, including 64 bit inode support from Peter Staubach and some pr

Re: [PATCH] 0/3 coding standards documentation/code updates

2007-09-29 Thread J. Bruce Fields
On Sat, Sep 29, 2007 at 11:18:05AM -0700, Linus Torvalds wrote: > I'm not very happy with this. > > "CodingStyle" should be about the big issues, not about details. Yes, > we've messed that up over the years, but let's not continue that. > > In other words, I'd suggest *removing* lines from Codi

Re: [PATCH] Wake up mandatory locks waiter on chmod

2007-09-17 Thread J. Bruce Fields
On Mon, Sep 17, 2007 at 10:37:56AM +0400, Pavel Emelyanov wrote: > J. Bruce Fields wrote: > > Is there a small chance that a lock may be applied after this check: > > > >> + mandatory = (inode->i_flock && MANDATORY_LOCK(inode)); > >> + > > &g

Re: [2.6.22.6] nfsd: fh_verify() `malloc failure' with lots of free memory leads to NFS hang

2007-09-17 Thread J. Bruce Fields
istro will give you). Or just apply the following--which did fix a problem whose symptoms varied depending on libc behavior. If that doesn't work, I'd try strace -s0 `pidof rpc.mountd` and also look at the contents of /proc/net/rpc/nfsd.fh/contents. --b. commit dd087896285

Re: [2.6.22.6] nfsd: fh_verify() `malloc failure' with lots of free memory leads to NFS hang

2007-09-17 Thread J. Bruce Fields
On Tue, Sep 18, 2007 at 12:54:07AM +0100, Nix wrote: > The code which calls new_do_write() looks like this: > > ,[ libio/fileops.c:_IO_new_file_xsputn() ] > | if (do_write) > |{ > | count = new_do_write (f, s, do_write); > | to_do -= count; > | if (count < do_write) > |

Re: [PATCH] Wake up mandatory locks waiter on chmod (v2)

2007-09-18 Thread J. Bruce Fields
On Tue, Sep 18, 2007 at 10:33:26AM +0400, Pavel Emelyanov wrote: > Trond Myklebust wrote: > > IOW: the process that is waiting in locks_mandatory_area() will be > > released as soon as the advisory lock is dropped. If that theory is > > broken in practice, then that is the bug that we need to fix.

Re: [PATCH] Wake up mandatory locks waiter on chmod (v2)

2007-09-18 Thread J. Bruce Fields
On Tue, Sep 18, 2007 at 12:14:55PM -0400, Trond Myklebust wrote: > Note also that strictly speaking, we're not even compliant with the > System V behaviour on read() and write(). See: > > http://www.unix.org.ua/orelly/networking_2ndEd/nfs/ch11_01.htm > and > > http://docs.sun.com/app/docs/doc

Re: [PATCH] Wake up mandatory locks waiter on chmod (v2)

2007-09-18 Thread J. Bruce Fields
On Tue, Sep 18, 2007 at 12:54:56PM -0400, Trond Myklebust wrote: > On Tue, 2007-09-18 at 12:52 -0400, J. Bruce Fields wrote: > > So currently there's nothing to prevent this: > > > > - write passes locks_mandatory_area() checks &g

Re: NFS4 authentification / fsuid

2007-09-19 Thread J. Bruce Fields
On Wed, Sep 19, 2007 at 07:42:20PM +0530, Satyam Sharma wrote: > > > On Wed, 19 Sep 2007, Kyle Moffett wrote: > > > > > [all sorts of crap about spies in washington needing stronger protection > > > than your average consumer] > > > > [snip] > > > > [...] all the bullcrap about foreign intelli

Re: [PATCH] Wake up mandatory locks waiter on chmod

2007-09-19 Thread J. Bruce Fields
On Tue, Sep 18, 2007 at 10:36:32AM +0400, Pavel Emelyanov wrote: > J. Bruce Fields wrote: > > I would also prefer a locking scheme that didn't rely on the BKL. That > > said, except for this race: > > I would as well :) But I don't know the locking code good en

Re: [PATCH] Consolidate sleeping routines in file locking code

2007-09-19 Thread J. Bruce Fields
On Tue, Sep 18, 2007 at 05:41:08PM +0400, Pavel Emelyanov wrote: > This is the next step in fs/locks.c cleanup before turning > it into using the struct pid *. > > This time I found, that there are some places that do a > similar thing - they try to apply a lock on a file and go > to sleep on er

Re: [PATCH] Rework /proc/locks via seq_files and seq_list helpers

2007-09-19 Thread J. Bruce Fields
On Wed, Sep 19, 2007 at 03:35:27PM +0400, Pavel Emelyanov wrote: > Currently /proc/locks is shown with a proc_read function, but > its behavior is rather complex as it has to manually handle > current offset and buffer length. On the other hand, files > that show objects from lists can be easily r

Re: [PATCH] Use list_first_entry in locks_wake_up_blocks

2007-09-19 Thread J. Bruce Fields
On Wed, Sep 19, 2007 at 04:44:07PM +0400, Pavel Emelyanov wrote: > This routine deletes all the elements from the list > with the "while (!list_empty())" loop, and we already > have a list_first_entry() macro to help it look nicer :) OK. --b. > > Signed-off-by: Pavel Emelyanov <[EMAIL PROTECTED

Re: [PATCH] Fix potential OOPS in generic_setlease()

2007-09-19 Thread J. Bruce Fields
On Wed, Sep 19, 2007 at 06:26:05PM +0400, Pavel Emelyanov wrote: > This code is run under lock_kernel(), which is dropped during > sleeping operations, so the following race is possible: > > CPU1:CPU2: > vfs_setlease();vfs_setlease(); > lock_

[PATCH] rpc: fix garbage in printk in svc_tcp_accept()

2007-09-20 Thread J. Bruce Fields
hich is a macro which expands to an if statement.) Signed-off-by: Wolfgang Walter <[EMAIL PROTECTED]> Signed-off-by: J. Bruce Fields <[EMAIL PROTECTED]> --- net/sunrpc/svcsock.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) We're printk'ing random uninitialized

Re: [PATCH] rpc: fix garbage in printk in svc_tcp_accept()

2007-09-20 Thread J. Bruce Fields
On Thu, Sep 20, 2007 at 01:15:05PM -0700, Linus Torvalds wrote: > > > On Thu, 20 Sep 2007, J. Bruce Fields wrote: > > > > we upgraded the kernel of a nfs-server from 2.6.17.11 to 2.6.22.6. Since > > then we get the message > ... > > Bruce - you're losin

Re: [PATCH] Fix potential OOPS in generic_setlease() (v2)

2007-09-20 Thread J. Bruce Fields
unlock_kernel(); >locks_insert_lock(before, fl); >/* OOPS! We have just tried to add the lease > * at the tail of already removed one > */ > > The similar races are already handled in other code - all the > allocations are perfo

Re: [PATCH] Consolidate sleeping routines in file locking code

2007-09-20 Thread J. Bruce Fields
On Thu, Sep 20, 2007 at 01:09:51PM +0400, Pavel Emelyanov wrote: > J. Bruce Fields wrote: > > On Tue, Sep 18, 2007 at 05:41:08PM +0400, Pavel Emelyanov wrote: > >> This is the next step in fs/locks.c cleanup before turning > >> it into using the struct pid *. > &

Re: NFS on loopback locks up entire system(2.6.23-rc6)?

2007-09-21 Thread J. Bruce Fields
On Thu, Sep 20, 2007 at 08:12:34PM -0700, Chakri n wrote: > And unfortunately in my case, I cannot use "mount --bind". I want to > use the same file system from two different nodes, and I want file & > record locking to be consistent. The only way to make sure locking is > consistent is to use loop

Re: [2.6.22.6] nfsd: fh_verify() `malloc failure' with lots of free memory leads to NFS hang

2007-09-21 Thread J. Bruce Fields
On Fri, Sep 21, 2007 at 07:46:32PM +0100, Nix wrote: > On 18 Sep 2007, J. Bruce Fields told this: > > Also I suppose we should check which version of nfs-utils that fix is in > > and make sure distributions are getting the fixed nfs-utils before they > > get the new libc,

Re: [PATCH 2/2] MAINTAINERS

2007-08-18 Thread J. Bruce Fields
On Sat, Aug 18, 2007 at 12:08:54AM -0700, Joe Perches wrote: > KERNEL NFSD > P: J. Bruce Fields > M: [EMAIL PROTECTED] > P: Neil Brown > M: [EMAIL PROTECTED] > L: [EMAIL PROTECTED] > W: http://nfs.sourceforge.net/ > S: Supported > +F: fs/nfsd/

Re: [PATCH 2/2] MAINTAINERS

2007-08-18 Thread J. Bruce Fields
On Sat, Aug 18, 2007 at 10:00:42AM -0700, Joe Perches wrote: > On Sat, 2007-08-18 at 11:00 -0400, J. Bruce Fields wrote: > > Also, some paths that are shared with the client: > > +F: fs/lockd/ > > +F: fs/nfs_common/ > > +F: net/sunrpc/ > > +F: include/linux/lo

Re: NFS hang + umount -f: better behaviour requested.

2007-08-21 Thread J. Bruce Fields
On Tue, Aug 21, 2007 at 12:43:47PM -0400, John Stoffel wrote: > Robin> I've read every man page I could find, and the only nfs option > Robin> that semes even vaguely helpful is "soft", but everything that > Robin> mentions "soft" also says to never use it. > > I think the man pages are out of dat

Re: NFS hang + umount -f: better behaviour requested.

2007-08-21 Thread J. Bruce Fields
On Tue, Aug 21, 2007 at 02:50:42PM -0400, John Stoffel wrote: > Not in my experience. We use NetApps as our backing NFS servers, so > maybe my experience isn't totally relevant. But with a mix of Linux > and Solaris clients, we've never had problems with soft,intr on our > NFS clients. > > We al

Re: NFS/RPC Hangs after updating time...

2007-08-22 Thread J. Bruce Fields
On Wed, Aug 22, 2007 at 02:37:22PM -0400, Morrison, Tom wrote: > I am working with a 2.6.11++ kernel on an embedded > server platform that is NFS serving Linux rootfs > for other embedded NFS Client boards. > > Everything works fine when the system time on the > server board is relatively synch

Re: NFS hang + umount -f: better behaviour requested.

2007-08-24 Thread J. Bruce Fields
On Fri, Aug 24, 2007 at 11:09:14AM -0400, Ric Wheeler wrote: > J. Bruce Fields wrote: >> The NFS server alone can't prevent the problems Peter Staubach refers >> to. Their frequency also depends on the network and the way you're >> using the filesystem. (A su

Re: nfs4 filesystem mounted via the "bind" option reports wrong fstype

2007-08-27 Thread J. Bruce Fields
On Mon, Aug 27, 2007 at 08:32:51PM +0200, Gabriel Barazer wrote: > Hi, > > A nfs4 filesystem, mounted elsewhere via the "bind" option (the usual > way to do with nfsv4 and its pseudofs), reports wrong fstype "nfs" > instead of "nfs4" filesystem. > An example is much easier to understand : > Serv

Re: [RFC PATCH 09/14] sunrpc: add basic support for workqueue-based services

2014-12-08 Thread J. Bruce Fields
On Tue, Dec 02, 2014 at 01:24:18PM -0500, Jeff Layton wrote: > diff --git a/net/sunrpc/Kconfig b/net/sunrpc/Kconfig > index fb78117b896c..08e01949bdc5 100644 > --- a/net/sunrpc/Kconfig > +++ b/net/sunrpc/Kconfig > @@ -71,3 +71,13 @@ config SUNRPC_XPRT_RDMA_SERVER > choose M here: the module

Re: [PATCH v2] fs: nfsd: Fix signedness bug in compare_blob

2014-12-05 Thread J. Bruce Fields
On Fri, Dec 05, 2014 at 04:40:07PM +0100, Rasmus Villemoes wrote: > Bugs similar to the one in acbbe6fbb240 (kcmp: fix standard comparison > bug) are in rich supply. > > In this variant, the problem is that struct xdr_netobj::len has type > unsigned int, so the expression o1->len - o2->len _also_

Re: [PATCH] nfsd: nfs4state: Remove unused function

2015-01-14 Thread J. Bruce Fields
On Tue, Jan 13, 2015 at 09:57:24PM +0100, Rickard Strandqvist wrote: > Remove the function renew_client() that is not used anywhere. > > This was partially found by using a static code analysis program called > cppcheck. Huh. OK, queueing up for 3.20.--b. > > Signed-off-by: Rickard Strandqvis

Re: [RFC PATCH 0/5] Second attempt at contained helper execution

2015-01-14 Thread J. Bruce Fields
On Wed, Jan 14, 2015 at 05:32:22PM +0800, Ian Kent wrote: > This series is a further attempt to find how (or even an acceptable > way) to execute a usermode helper in a contained environment. > > Being an attempt to find how to do this no testing has been done and > won't be until a suitable appro

Re: [RFC PATCH 0/5] Second attempt at contained helper execution

2015-01-14 Thread J. Bruce Fields
> On Wed, Jan 14, 2015 at 05:32:22PM +0800, Ian Kent wrote: > > There are other difficulties to tackle as well, such as how to decide > > if contained helper execution is needed. For example, if a mount has > > been propagated to a container or bound into the container tree (such > > as with the --

Re: [RFC PATCH 0/5] Second attempt at contained helper execution

2015-01-15 Thread J. Bruce Fields
On Thu, Jan 15, 2015 at 08:26:12AM +0800, Ian Kent wrote: > On Wed, 2015-01-14 at 17:10 -0500, J. Bruce Fields wrote: > > > On Wed, Jan 14, 2015 at 05:32:22PM +0800, Ian Kent wrote: > > > > There are other difficulties to tackle as well, such as how to decide > > >

Re: 3.18.1: broken directory with one file too many

2015-01-07 Thread J. Bruce Fields
On Wed, Jan 07, 2015 at 12:25:06AM +, Holger Hoffstätte wrote: > On Sat, 20 Dec 2014 13:02:43 -0500, J. Bruce Fields wrote: > > > On Thu, Dec 18, 2014 at 08:44:37PM +0100, Holger Hoffstätte wrote: > >> On 12/18/14 18:06, J. Bruce Fields wrote: > >> > Whoops,

[PATCH] nfsd4: tweak rd_dircount accounting

2015-01-07 Thread J. Bruce Fields
From: "J. Bruce Fields" RFC 3530 14.2.24 says This value represents the length of the names of the directory entries and the cookie value for these entries. This length represents the XDR encoding of the data (names and cookies)... The "xdr encoding"

nfsd bugfixes for 3.19

2015-01-08 Thread J. Bruce Fields
Please pull two nfsd bugfixes from git://linux-nfs.org/~bfields/linux.git for-3.19 --b. J. Bruce Fields (1): rpc: fix xdr_truncate_encode to handle buffer ending on page boundary Jeff Layton (1): nfsd: fix

Re: [PATCH] lockd: xdr: Remove unused function

2015-01-12 Thread J. Bruce Fields
On Sat, Jan 10, 2015 at 06:02:42PM +0100, Rickard Strandqvist wrote: > Remove the function nlm_encode_fh() that is not used anywhere. > > This was partially found by using a static code analysis program called > cppcheck. Huh. OK, thanks--applying. --b. > > Signed-off-by: Rickard Strandqvist

Re: [RFC PATCH 0/5] Second attempt at contained helper execution

2015-01-16 Thread J. Bruce Fields
On Fri, Jan 16, 2015 at 09:01:13AM +0800, Ian Kent wrote: > On Thu, 2015-01-15 at 11:27 -0500, J. Bruce Fields wrote: > > On Thu, Jan 15, 2015 at 08:26:12AM +0800, Ian Kent wrote: > > > On Wed, 2015-01-14 at 17:10 -0500, J. Bruce Fields wrote: > > > > > On Wed,

[GIT] nfsd bugfix for 4.0

2015-03-20 Thread J. Bruce Fields
Please pull the following nfsd bugfix for 4.0: git://linux-nfs.org/~bfields/linux.git for-4.0 This is a fix for a crash easily triggered by 4.1 activity to a server built with CONFIG_NFSD_PNFS. There are some more bugfixes queued up that I intend to pass along next week, but this is the most c

Re: [GIT] nfsd bugfix for 4.0

2015-03-20 Thread J. Bruce Fields
On Fri, Mar 20, 2015 at 09:24:30AM -0700, Christoph Hellwig wrote: > FYI, I think the patch Kinglong Mee sent today is the better fix, > together with the mangled patch description in mine it might be better > to send that after a little bit of testing. Gah, I'm not keeping up with my mail. I've

Re: [RFC PATCH 5 3/7] nfsd - use service thread if not executing in init namespace

2015-04-02 Thread J. Bruce Fields
On Wed, Apr 01, 2015 at 08:22:58AM +0800, Ian Kent wrote: > On Tue, 2015-03-31 at 09:14 -0400, J. Bruce Fields wrote: > > On Tue, Mar 31, 2015 at 11:14:58AM +0800, Ian Kent wrote: > > > From: Ian Kent > > > > > > If nfsd is running within a container the cli

Re: [PATCH] sunrpc: eliminate RPC_DEBUG

2015-04-06 Thread J. Bruce Fields
On Mon, Apr 06, 2015 at 10:45:36AM -0400, Jeff Layton wrote: > On Mon, 06 Apr 2015 16:38:09 +0200 > Arnd Bergmann wrote: > > > On Monday 06 April 2015 10:04:52 Jeff Layton wrote: > > > > diff --git a/fs/lockd/svcsubs.c b/fs/lockd/svcsubs.c > > > > index 665ef5a..a563ddb 100644 > > > > --- a/fs/lo

[GIT] nfsd changes for 4.0

2015-04-23 Thread J. Bruce Fields
artup race triggering BUG_ON J. Bruce Fields (4): nfsd: allow setting acls with unenforceable DENYs nfsd4: disallow ALLOCATE with special stateids nfsd4: disallow SEEK with special stateids nfsd4: fix READ permission checking Jeff Layton (2): nfsd: remove bogus setting of

Re: [GIT] nfsd changes for 4.0

2015-04-24 Thread J. Bruce Fields
On Fri, Apr 24, 2015 at 07:47:59AM -0700, Linus Torvalds wrote: > On Thu, Apr 23, 2015 at 8:12 AM, J. Bruce Fields wrote: > > Please pull nfsd changes for 4.0 from: > > > > git://linux-nfs.org/~bfields/linux.git for-4.0 > > You meant "for-4.1". Yes. &g

Re: [PATCH RFC 1/3] vfs: add copy_file_range syscall and vfs helper

2015-04-14 Thread J. Bruce Fields
On Tue, Apr 14, 2015 at 01:16:13PM -0400, Anna Schumaker wrote: > On 04/14/2015 12:53 PM, Christoph Hellwig wrote: > > On Sat, Apr 11, 2015 at 09:04:02AM -0400, Jeff Layton wrote: > >> Yuck! How the heck do you clean up the mess if that happens? I > >> guess you're just stuck redoing the copy with

Re: [PATCH RFC 1/3] vfs: add copy_file_range syscall and vfs helper

2015-04-14 Thread J. Bruce Fields
On Tue, Apr 14, 2015 at 11:22:41AM -0700, Zach Brown wrote: > On Tue, Apr 14, 2015 at 02:19:11PM -0400, J. Bruce Fields wrote: > > On Tue, Apr 14, 2015 at 01:16:13PM -0400, Anna Schumaker wrote: > > > On 04/14/2015 12:53 PM, Christoph Hellwig wrote: > > > > On Sat, Ap

Re: [PATCH 7/9 net-next] sunrpc: replace if/BUG by BUG_ON

2015-03-30 Thread J. Bruce Fields
Huh, I thought this wasn't recommended: http://lkml.kernel.org/r/20040828125816.206ef7fa.a...@osdl.org "I'd prefer that we not move code which has side-effects into BUG_ONs" --b. On Mon, Mar 30, 2015 at 11:13:15PM +0200, Fabian Frederick wrote: > Signed-off-by: Fabian Fr

Re: [RFC PATCH 5 3/7] nfsd - use service thread if not executing in init namespace

2015-03-31 Thread J. Bruce Fields
vironment > for usermode helper calls. > > Signed-off-by: Ian Kent > Cc: Benjamin Coddington > Cc: Al Viro > Cc: J. Bruce Fields > Cc: David Howells > Cc: Trond Myklebust > Cc: Oleg Nesterov > Cc: Eric W. Biederman > Cc: Jeff Layton > --- > fs/nfsd/ne

nfsd bugfixes for 4.0

2015-03-31 Thread J. Bruce Fields
Hellwig (1): nfsd: require an explicit option to enable pNFS J. Bruce Fields (1): nfsd: return correct lockowner when there is a race on hash insert Jeff Layton (2): nfsd: return correct openowner when there is a race to put one in the hash sunrpc: make debugfs file creation f

Re: [RFC 02/39] uapi: Remove kernel internal declaration

2015-04-20 Thread J. Bruce Fields
On Fri, Mar 27, 2015 at 05:50:00PM +0100, Andreas Gruenbacher wrote: > The enum nfs4_acl_whotype is only used in nfs4d's internal nfs4 acl > representation. No longer expose it to user space. I'll go ahead and apply that now. --b. > > Signed-off-by: Andreas Gruenbacher > --- > include/linux/n

Re: [RFC 11/39] richacl: Compute maximum file masks from an acl

2015-04-20 Thread J. Bruce Fields
r acls which do not include any group class > + * deny aces: in such acls, the group class is never denied any > + * permissions from everyone@ allow aces. > + */ Cripes, by the time I got to this point I'd already written one response where I complained this was wrong, an

Re: [PATCH] SUNRPC: Prevent kernel stack corruption on long values of flush

2012-07-18 Thread J. Bruce Fields
On Tue, Jul 17, 2012 at 12:01:26AM +0200, Sasha Levin wrote: > The buffer size in read_flush() is too small for the longest possible values > for it. This can lead to a kernel stack corruption: Thanks! > > diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c > index 2afd2a8..f86d95e 100644 > ---

Re: [PATCH] SUNRPC: Prevent kernel stack corruption on long values of flush

2012-07-18 Thread J. Bruce Fields
On Wed, Jul 18, 2012 at 04:00:49PM -0400, Jim Rees wrote: > J. Bruce Fields wrote: > > On Tue, Jul 17, 2012 at 12:01:26AM +0200, Sasha Levin wrote: > > The buffer size in read_flush() is too small for the longest possible > values > > for it. This can lead to a

Re: [PATCH v2] NFSd: simplify locking in nfsd_recall_delegations()

2012-07-18 Thread J. Bruce Fields
On Tue, Jul 03, 2012 at 05:02:24PM +0400, Stanislav Kinsbursky wrote: > v2: rebased on 3.5-rc3 kernel > > Holding of client_mutex looks redundant here - recall_lock looks enough. Yep, thanks.--b. > > Signed-off-by: Stanislav Kinsbursky > --- > fs/nfsd/nfs4state.c |2 -- > 1 files changed,

Re: [RFC v3 14/45] richacl: Permission check algorithm

2015-05-27 Thread J. Bruce Fields
On Wed, May 27, 2015 at 01:25:18PM +0200, Andreas Grünbacher wrote: > 2015-05-22 23:08 GMT+02:00 J. Bruce Fields : > > On Fri, Apr 24, 2015 at 01:04:11PM +0200, Andreas Gruenbacher wrote: > >> A richacl grants a requested access if the NFSv4 acl in the richacl > >> grant

Re: [RFC v3 19/45] richacl: Also recognize nontrivial mode-equivalent acls

2015-05-27 Thread J. Bruce Fields
On Wed, May 27, 2015 at 11:24:49AM +0200, Andreas Grünbacher wrote: > Bruce, > > 2015-05-15 22:51 GMT+02:00 J. Bruce Fields : > > On Fri, Apr 24, 2015 at 01:04:16PM +0200, Andreas Gruenbacher wrote: > > This comment is a little confusing: > > > >> + * This fun

Re: [RFC v3 30/45] richacl: Create richacl from mode values

2015-05-28 Thread J. Bruce Fields
On Fri, Apr 24, 2015 at 01:04:27PM +0200, Andreas Gruenbacher wrote: > Create a richacl that corresponds to given file mode permission bits. > > Signed-off-by: Andreas Gruenbacher > --- > fs/richacl_compat.c | 38 ++ > include/linux/richacl.h | 1 + > 2 f

Re: [RFC v3 30/45] richacl: Create richacl from mode values

2015-05-28 Thread J. Bruce Fields
On Thu, May 28, 2015 at 03:24:13PM -0400, bfields wrote: > On Fri, Apr 24, 2015 at 01:04:27PM +0200, Andreas Gruenbacher wrote: > > Create a richacl that corresponds to given file mode permission bits. > > > > Signed-off-by: Andreas Gruenbacher > > --- > > fs/richacl_compat.c | 38 ++

Re: [RFC v3 33/45] nfsd: Keep list of acls to dispose of in compoundargs

2015-05-28 Thread J. Bruce Fields
On Fri, Apr 24, 2015 at 01:04:30PM +0200, Andreas Gruenbacher wrote: > We will decode acls in requests into richacls; those need to be richacl_put() > at the end of the request instead of kfree()d; this allows the vfs to cache > them whenever possible. > > NOTE: If we allow only a single acl per r

<    3   4   5   6   7   8   9   10   11   12   >