From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@lists.01.org, Vasily Averin <vvs@virtuozzo.com>,
Trond Myklebust <trond.myklebust@hammerspace.com>,
Anna Schumaker <anna.schumaker@netapp.com>
Cc: lkp@intel.com, kbuild-all@lists.01.org, kernel@openvz.org,
linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] nfs4: handle async processing of F_SETLK with FL_SLEEP
Date: Thu, 6 Jan 2022 13:37:19 +0300 [thread overview]
Message-ID: <202112281638.RNX7e40X-lkp@intel.com> (raw)
In-Reply-To: <3a2c6cb9-abe7-ab32-b11c-d78621361555@virtuozzo.com>
Hi Vasily,
url: https://github.com/0day-ci/linux/commits/Vasily-Averin/nfs4-handle-async-processing-of-F_SETLK-with-FL_SLEEP/20211227-184632
base: git://git.linux-nfs.org/projects/trondmy/linux-nfs.git linux-next
config: i386-randconfig-m021-20211227 (https://download.01.org/0day-ci/archive/20211228/202112281638.RNX7e40X-lkp@intel.com/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
New smatch warnings:
fs/nfs/nfs4proc.c:7202 _nfs4_proc_setlk() warn: should this be a bitwise op?
vim +7202 fs/nfs/nfs4proc.c
^1da177e4c3f41 Linus Torvalds 2005-04-16 7194 static int _nfs4_proc_setlk(struct nfs4_state *state, int cmd, struct file_lock *request)
^1da177e4c3f41 Linus Torvalds 2005-04-16 7195 {
19e03c570e6099 Trond Myklebust 2008-12-23 7196 struct nfs_inode *nfsi = NFS_I(state->inode);
11476e9dec39d9 Chuck Lever 2016-04-11 7197 struct nfs4_state_owner *sp = state->owner;
01c3b861cd77b2 Trond Myklebust 2006-06-29 7198 unsigned char fl_flags = request->fl_flags;
1ea67dbd982827 Jeff Layton 2016-09-17 7199 int status;
^1da177e4c3f41 Linus Torvalds 2005-04-16 7200
01c3b861cd77b2 Trond Myklebust 2006-06-29 7201 request->fl_flags |= FL_ACCESS;
7ae55d384b2f33 Vasily Averin 2021-12-27 @7202 if ((request->fl_flags && FL_SLEEP) && IS_SETLK(cmd))
^^
Same thing but for nfsv4.
7ae55d384b2f33 Vasily Averin 2021-12-27 7203 status = posix_lock_file(request->fl_file, request, NULL);
7ae55d384b2f33 Vasily Averin 2021-12-27 7204 else
75575ddf29cbbf Jeff Layton 2016-09-17 7205 status = locks_lock_inode_wait(state->inode, request);
7ae55d384b2f33 Vasily Averin 2021-12-27 7206 if (status)
01c3b861cd77b2 Trond Myklebust 2006-06-29 7207 goto out;
11476e9dec39d9 Chuck Lever 2016-04-11 7208 mutex_lock(&sp->so_delegreturn_mutex);
19e03c570e6099 Trond Myklebust 2008-12-23 7209 down_read(&nfsi->rwsem);
01c3b861cd77b2 Trond Myklebust 2006-06-29 7210 if (test_bit(NFS_DELEGATED_STATE, &state->flags)) {
01c3b861cd77b2 Trond Myklebust 2006-06-29 7211 /* Yes: cache locks! */
01c3b861cd77b2 Trond Myklebust 2006-06-29 7212 /* ...but avoid races with delegation recall... */
01c3b861cd77b2 Trond Myklebust 2006-06-29 7213 request->fl_flags = fl_flags & ~FL_SLEEP;
75575ddf29cbbf Jeff Layton 2016-09-17 7214 status = locks_lock_inode_wait(state->inode, request);
9a99af494bd714 Trond Myklebust 2013-02-04 7215 up_read(&nfsi->rwsem);
11476e9dec39d9 Chuck Lever 2016-04-11 7216 mutex_unlock(&sp->so_delegreturn_mutex);
9a99af494bd714 Trond Myklebust 2013-02-04 7217 goto out;
9a99af494bd714 Trond Myklebust 2013-02-04 7218 }
19e03c570e6099 Trond Myklebust 2008-12-23 7219 up_read(&nfsi->rwsem);
11476e9dec39d9 Chuck Lever 2016-04-11 7220 mutex_unlock(&sp->so_delegreturn_mutex);
c69899a17ca483 Trond Myklebust 2015-01-24 7221 status = _nfs4_do_setlk(state, cmd, request, NFS_LOCK_NEW);
01c3b861cd77b2 Trond Myklebust 2006-06-29 7222 out:
01c3b861cd77b2 Trond Myklebust 2006-06-29 7223 request->fl_flags = fl_flags;
^1da177e4c3f41 Linus Torvalds 2005-04-16 7224 return status;
^1da177e4c3f41 Linus Torvalds 2005-04-16 7225 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH] nfs4: handle async processing of F_SETLK with FL_SLEEP
Date: Thu, 06 Jan 2022 13:37:19 +0300 [thread overview]
Message-ID: <202112281638.RNX7e40X-lkp@intel.com> (raw)
In-Reply-To: <3a2c6cb9-abe7-ab32-b11c-d78621361555@virtuozzo.com>
[-- Attachment #1: Type: text/plain, Size: 3577 bytes --]
Hi Vasily,
url: https://github.com/0day-ci/linux/commits/Vasily-Averin/nfs4-handle-async-processing-of-F_SETLK-with-FL_SLEEP/20211227-184632
base: git://git.linux-nfs.org/projects/trondmy/linux-nfs.git linux-next
config: i386-randconfig-m021-20211227 (https://download.01.org/0day-ci/archive/20211228/202112281638.RNX7e40X-lkp(a)intel.com/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
New smatch warnings:
fs/nfs/nfs4proc.c:7202 _nfs4_proc_setlk() warn: should this be a bitwise op?
vim +7202 fs/nfs/nfs4proc.c
^1da177e4c3f41 Linus Torvalds 2005-04-16 7194 static int _nfs4_proc_setlk(struct nfs4_state *state, int cmd, struct file_lock *request)
^1da177e4c3f41 Linus Torvalds 2005-04-16 7195 {
19e03c570e6099 Trond Myklebust 2008-12-23 7196 struct nfs_inode *nfsi = NFS_I(state->inode);
11476e9dec39d9 Chuck Lever 2016-04-11 7197 struct nfs4_state_owner *sp = state->owner;
01c3b861cd77b2 Trond Myklebust 2006-06-29 7198 unsigned char fl_flags = request->fl_flags;
1ea67dbd982827 Jeff Layton 2016-09-17 7199 int status;
^1da177e4c3f41 Linus Torvalds 2005-04-16 7200
01c3b861cd77b2 Trond Myklebust 2006-06-29 7201 request->fl_flags |= FL_ACCESS;
7ae55d384b2f33 Vasily Averin 2021-12-27 @7202 if ((request->fl_flags && FL_SLEEP) && IS_SETLK(cmd))
^^
Same thing but for nfsv4.
7ae55d384b2f33 Vasily Averin 2021-12-27 7203 status = posix_lock_file(request->fl_file, request, NULL);
7ae55d384b2f33 Vasily Averin 2021-12-27 7204 else
75575ddf29cbbf Jeff Layton 2016-09-17 7205 status = locks_lock_inode_wait(state->inode, request);
7ae55d384b2f33 Vasily Averin 2021-12-27 7206 if (status)
01c3b861cd77b2 Trond Myklebust 2006-06-29 7207 goto out;
11476e9dec39d9 Chuck Lever 2016-04-11 7208 mutex_lock(&sp->so_delegreturn_mutex);
19e03c570e6099 Trond Myklebust 2008-12-23 7209 down_read(&nfsi->rwsem);
01c3b861cd77b2 Trond Myklebust 2006-06-29 7210 if (test_bit(NFS_DELEGATED_STATE, &state->flags)) {
01c3b861cd77b2 Trond Myklebust 2006-06-29 7211 /* Yes: cache locks! */
01c3b861cd77b2 Trond Myklebust 2006-06-29 7212 /* ...but avoid races with delegation recall... */
01c3b861cd77b2 Trond Myklebust 2006-06-29 7213 request->fl_flags = fl_flags & ~FL_SLEEP;
75575ddf29cbbf Jeff Layton 2016-09-17 7214 status = locks_lock_inode_wait(state->inode, request);
9a99af494bd714 Trond Myklebust 2013-02-04 7215 up_read(&nfsi->rwsem);
11476e9dec39d9 Chuck Lever 2016-04-11 7216 mutex_unlock(&sp->so_delegreturn_mutex);
9a99af494bd714 Trond Myklebust 2013-02-04 7217 goto out;
9a99af494bd714 Trond Myklebust 2013-02-04 7218 }
19e03c570e6099 Trond Myklebust 2008-12-23 7219 up_read(&nfsi->rwsem);
11476e9dec39d9 Chuck Lever 2016-04-11 7220 mutex_unlock(&sp->so_delegreturn_mutex);
c69899a17ca483 Trond Myklebust 2015-01-24 7221 status = _nfs4_do_setlk(state, cmd, request, NFS_LOCK_NEW);
01c3b861cd77b2 Trond Myklebust 2006-06-29 7222 out:
01c3b861cd77b2 Trond Myklebust 2006-06-29 7223 request->fl_flags = fl_flags;
^1da177e4c3f41 Linus Torvalds 2005-04-16 7224 return status;
^1da177e4c3f41 Linus Torvalds 2005-04-16 7225 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: Re: [PATCH] nfs4: handle async processing of F_SETLK with FL_SLEEP
Date: Tue, 28 Dec 2021 16:43:58 +0800 [thread overview]
Message-ID: <202112281638.RNX7e40X-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 4800 bytes --]
CC: kbuild-all(a)lists.01.org
In-Reply-To: <3a2c6cb9-abe7-ab32-b11c-d78621361555@virtuozzo.com>
References: <3a2c6cb9-abe7-ab32-b11c-d78621361555@virtuozzo.com>
TO: Vasily Averin <vvs@virtuozzo.com>
TO: Trond Myklebust <trond.myklebust@hammerspace.com>
TO: Anna Schumaker <anna.schumaker@netapp.com>
CC: kernel(a)openvz.org
CC: linux-nfs(a)vger.kernel.org
CC: linux-kernel(a)vger.kernel.org
Hi Vasily,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on trondmy-nfs/linux-next]
[also build test WARNING on v5.16-rc7 next-20211224]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Vasily-Averin/nfs4-handle-async-processing-of-F_SETLK-with-FL_SLEEP/20211227-184632
base: git://git.linux-nfs.org/projects/trondmy/linux-nfs.git linux-next
:::::: branch date: 22 hours ago
:::::: commit date: 22 hours ago
config: i386-randconfig-m021-20211227 (https://download.01.org/0day-ci/archive/20211228/202112281638.RNX7e40X-lkp(a)intel.com/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
New smatch warnings:
fs/nfs/nfs4proc.c:7202 _nfs4_proc_setlk() warn: should this be a bitwise op?
Old smatch warnings:
fs/nfs/nfs4proc.c:1382 nfs4_opendata_alloc() error: we previously assumed 'c' could be null (see line 1350)
fs/nfs/nfs4proc.c:2201 _nfs4_do_open_reclaim() warn: passing a valid pointer to 'PTR_ERR'
fs/nfs/nfs4proc.c:2310 nfs4_open_delegation_recall() warn: passing a valid pointer to 'PTR_ERR'
fs/nfs/nfs4proc.c:2728 _nfs4_open_expired() warn: passing a valid pointer to 'PTR_ERR'
vim +7202 fs/nfs/nfs4proc.c
f062eb6ced3b29 Bryan Schumaker 2011-06-02 7193
^1da177e4c3f41 Linus Torvalds 2005-04-16 7194 static int _nfs4_proc_setlk(struct nfs4_state *state, int cmd, struct file_lock *request)
^1da177e4c3f41 Linus Torvalds 2005-04-16 7195 {
19e03c570e6099 Trond Myklebust 2008-12-23 7196 struct nfs_inode *nfsi = NFS_I(state->inode);
11476e9dec39d9 Chuck Lever 2016-04-11 7197 struct nfs4_state_owner *sp = state->owner;
01c3b861cd77b2 Trond Myklebust 2006-06-29 7198 unsigned char fl_flags = request->fl_flags;
1ea67dbd982827 Jeff Layton 2016-09-17 7199 int status;
^1da177e4c3f41 Linus Torvalds 2005-04-16 7200
01c3b861cd77b2 Trond Myklebust 2006-06-29 7201 request->fl_flags |= FL_ACCESS;
7ae55d384b2f33 Vasily Averin 2021-12-27 @7202 if ((request->fl_flags && FL_SLEEP) && IS_SETLK(cmd))
7ae55d384b2f33 Vasily Averin 2021-12-27 7203 status = posix_lock_file(request->fl_file, request, NULL);
7ae55d384b2f33 Vasily Averin 2021-12-27 7204 else
75575ddf29cbbf Jeff Layton 2016-09-17 7205 status = locks_lock_inode_wait(state->inode, request);
7ae55d384b2f33 Vasily Averin 2021-12-27 7206 if (status)
01c3b861cd77b2 Trond Myklebust 2006-06-29 7207 goto out;
11476e9dec39d9 Chuck Lever 2016-04-11 7208 mutex_lock(&sp->so_delegreturn_mutex);
19e03c570e6099 Trond Myklebust 2008-12-23 7209 down_read(&nfsi->rwsem);
01c3b861cd77b2 Trond Myklebust 2006-06-29 7210 if (test_bit(NFS_DELEGATED_STATE, &state->flags)) {
01c3b861cd77b2 Trond Myklebust 2006-06-29 7211 /* Yes: cache locks! */
01c3b861cd77b2 Trond Myklebust 2006-06-29 7212 /* ...but avoid races with delegation recall... */
01c3b861cd77b2 Trond Myklebust 2006-06-29 7213 request->fl_flags = fl_flags & ~FL_SLEEP;
75575ddf29cbbf Jeff Layton 2016-09-17 7214 status = locks_lock_inode_wait(state->inode, request);
9a99af494bd714 Trond Myklebust 2013-02-04 7215 up_read(&nfsi->rwsem);
11476e9dec39d9 Chuck Lever 2016-04-11 7216 mutex_unlock(&sp->so_delegreturn_mutex);
9a99af494bd714 Trond Myklebust 2013-02-04 7217 goto out;
9a99af494bd714 Trond Myklebust 2013-02-04 7218 }
19e03c570e6099 Trond Myklebust 2008-12-23 7219 up_read(&nfsi->rwsem);
11476e9dec39d9 Chuck Lever 2016-04-11 7220 mutex_unlock(&sp->so_delegreturn_mutex);
c69899a17ca483 Trond Myklebust 2015-01-24 7221 status = _nfs4_do_setlk(state, cmd, request, NFS_LOCK_NEW);
01c3b861cd77b2 Trond Myklebust 2006-06-29 7222 out:
01c3b861cd77b2 Trond Myklebust 2006-06-29 7223 request->fl_flags = fl_flags;
^1da177e4c3f41 Linus Torvalds 2005-04-16 7224 return status;
^1da177e4c3f41 Linus Torvalds 2005-04-16 7225 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 7226
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
next parent reply other threads:[~2022-01-06 10:37 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-28 8:43 kernel test robot [this message]
2022-01-06 10:37 ` [PATCH] nfs4: handle async processing of F_SETLK with FL_SLEEP Dan Carpenter
2022-01-06 10:37 ` Dan Carpenter
-- strict thread matches above, loose matches on Subject: below --
2021-12-27 10:45 Vasily Averin
2021-12-27 15:51 ` [PATCH v2] " Vasily Averin
2021-12-28 1:04 ` Vasily Averin
2021-12-29 8:24 ` [PATCH v3 1/3] nfs: local_lock: " Vasily Averin
2021-12-29 8:24 ` [PATCH v3 2/3] nfs4: " Vasily Averin
2022-01-03 19:40 ` J. Bruce Fields
2022-01-16 12:25 ` Vasily Averin
2022-01-03 19:53 ` J. Bruce Fields
2022-01-16 12:44 ` Vasily Averin
2022-01-16 18:28 ` Vasily Averin
2022-01-18 22:35 ` J. Bruce Fields
2021-12-29 8:24 ` [PATCH v3 3/3] nfs v2/3: nlmclnt_lock: " Vasily Averin
2021-12-27 17:58 ` [PATCH] nfs4: " kernel test robot
2021-12-27 17:58 ` kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202112281638.RNX7e40X-lkp@intel.com \
--to=dan.carpenter@oracle.com \
--cc=anna.schumaker@netapp.com \
--cc=kbuild-all@lists.01.org \
--cc=kbuild@lists.01.org \
--cc=kernel@openvz.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=lkp@intel.com \
--cc=trond.myklebust@hammerspace.com \
--cc=vvs@virtuozzo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.