RFC fs: nfs: async lock request changes
Get series with b4
b4 am [email protected]Versions newest first
- v2 RFC Latest7 patches 14 repliesIn review
changes since v2 from the cover letter
- add dlm fixes/changes to show how the new API should work. It's used by gfs2/ocfs2.
- handle non-blocking request synchronously. For this reason we needed to introduce a new per nlm_block request to fix a race between request and lm_grant() callback handling, see b_cb_mutex
- update documentation for new FL_SLEEP handling when lm_grant() is set and new requirement that lm_grant() need to be called from a sleepable contex.
- clear new CALLBACK PENDING flag when nlm_block is removed from nlm_blocked
- introduce helper export_op_support_safe_async_lock() to check if the filesystem supports asynchronous lock request calls
- fix block variable never NULL when iterating over nlm_blocked list
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/7 | lockd: fix race in async lock request handlingfs/ include/ | +74 | 4 replies | |
| 2/7 | lockd: FILE_LOCK_DEFERRED only on FL_SLEEPfs/ | +7 | 2 replies | |
| 3/7 | lockd: introduce safe async lock opfs/ fs/ include/ | +20 | 1 reply | |
| 4/7 | locks: update lock callback documentationfs/ | +14 | 2 replies | |
| 5/7 | dlm: use fl_owner from lockdfs/ | +4 | 1 reply | |
| 6/7 | dlm: use FL_SLEEP to check if blocking requestfs/ | +22 | 4 replies | |
| 7/7 | dlm: implement EXPORT_OP_SAFE_ASYNC_LOCKfs/ fs/ | +2 | 0 replies |
Reviews trailers per patch
2 of 7 patches have a Reviewed-by or Acked-by.
| Patch | Jeff Layton |
|---|---|
| 1/7 | |
| 2/7 | |
| 3/7 | A-b |
| 4/7 | |
| 5/7 | A-b |
| 6/7 | |
| 7/7 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [RFCv2 0/7] fs: nfs: async lock request changes
Hi,
this patch series contains changes to lockd asynchronous lock request handling over vfs_lock_file(). The only one upstream user so far I see is DLM. The current DLM handling of asynchronous lock request is broken. Those patches makes the asynchronous lock request handling better, there are still issues with fencing or lock cancellation that this patch series does not tackle.
The cifs filesystem is another user of FILE_LOCK_DEFERRED but it does not do anything on checking lm_grant() as the asynchronous lock API is required to check if it's set.
- Alex
changes since v2:
- add dlm fixes/changes to show how the new API should work. It's used by gfs2/ocfs2.
- handle non-blocking request synchronously. For this reason we needed to introduce a new per nlm_block request to fix a race between request and lm_grant() callback handling, see b_cb_mutex
- update documentation for new FL_SLEEP handling when lm_grant() is set and new requirement that lm_grant() need to be called from a sleepable contex.
- clear new CALLBACK PENDING flag when nlm_block is removed from nlm_blocked
- introduce helper export_op_support_safe_async_lock() to check if the filesystem supports asynchronous lock request calls
- fix block variable never NULL when iterating over nlm_blocked list
Alexander Aring (7):
lockd: fix race in async lock request handling
lockd: FILE_LOCK_DEFERRED only on FL_SLEEP
lockd: introduce safe async lock op
locks: update lock callback documentation
dlm: use fl_owner from lockd
dlm: use FL_SLEEP to check if blocking request
dlm: implement EXPORT_OP_SAFE_ASYNC_LOCK
fs/dlm/plock.c | 54 +++++++------- fs/gfs2/export.c | 1 + fs/lockd/svclock.c | 140 ++++++++++++++++++++---------------- fs/locks.c | 28 ++++---- fs/nfsd/nfs4state.c | 13 +++- fs/ocfs2/export.c | 1 + include/linux/exportfs.h | 8 +++ include/linux/lockd/lockd.h | 2 + 8 files changed, 140 insertions(+), 107 deletions(-)
Signature · 1 line
2.31.1