Skip to content

Commit

Permalink
gfs2/ocfs2: set FOP_ASYNC_LOCK
Browse files Browse the repository at this point in the history
Both GFS2 and OCFS2 use DLM locking, which will allow async lock requests.
Signal this support by setting FOP_ASYNC_LOCK.

Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
Link: https://lore.kernel.org/r/fc4163dbbf33c58e5a8b8ee8cb8c57e555f53ce5.1726083391.git.bcodding@redhat.com
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
  • Loading branch information
Benjamin Coddington authored and Christian Brauner committed Sep 12, 2024
1 parent 8cf9a01 commit 2253ab9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fs/gfs2/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -1586,6 +1586,7 @@ const struct file_operations gfs2_file_fops = {
.splice_write = gfs2_file_splice_write,
.setlease = simple_nosetlease,
.fallocate = gfs2_fallocate,
.fop_flags = FOP_ASYNC_LOCK,
};

const struct file_operations gfs2_dir_fops = {
Expand All @@ -1598,6 +1599,7 @@ const struct file_operations gfs2_dir_fops = {
.lock = gfs2_lock,
.flock = gfs2_flock,
.llseek = default_llseek,
.fop_flags = FOP_ASYNC_LOCK,
};

#endif /* CONFIG_GFS2_FS_LOCKING_DLM */
Expand Down
2 changes: 2 additions & 0 deletions fs/ocfs2/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -2793,6 +2793,7 @@ const struct file_operations ocfs2_fops = {
.splice_write = iter_file_splice_write,
.fallocate = ocfs2_fallocate,
.remap_file_range = ocfs2_remap_file_range,
.fop_flags = FOP_ASYNC_LOCK,
};

WRAP_DIR_ITER(ocfs2_readdir) // FIXME!
Expand All @@ -2809,6 +2810,7 @@ const struct file_operations ocfs2_dops = {
#endif
.lock = ocfs2_lock,
.flock = ocfs2_flock,
.fop_flags = FOP_ASYNC_LOCK,
};

/*
Expand Down

0 comments on commit 2253ab9

Please sign in to comment.