From: Amir Goldstein <amir73il@gmail.com>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: Konstantin Khlebnikov <koct9i@gmail.com>,
Al Viro <viro@zeniv.linux.org.uk>,
linux-unionfs@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: [RFC][PATCH 1/4] vfs: update documentation for inode operation locking rules
Date: Sat, 12 Nov 2016 21:36:01 +0200 [thread overview]
Message-ID: <1478979364-10355-2-git-send-email-amir73il@gmail.com> (raw)
In-Reply-To: <1478979364-10355-1-git-send-email-amir73il@gmail.com>
- Remove obsolete truncate operation prototype
- Reorder prototypes mostly by their order in inode_operations struct
- Match locking rules order to prototypes order
- Add missing rule for set_acl operation
- Fix indentation
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
---
Documentation/filesystems/Locking | 27 ++++++++++++++-------------
1 file changed, 14 insertions(+), 13 deletions(-)
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking
index 14cdc10..0e35b16 100644
--- a/Documentation/filesystems/Locking
+++ b/Documentation/filesystems/Locking
@@ -42,8 +42,11 @@ d_real no no yes no
--------------------------- inode_operations ---------------------------
prototypes:
- int (*create) (struct inode *,struct dentry *,umode_t, bool);
struct dentry * (*lookup) (struct inode *,struct dentry *, unsigned int);
+ int (*permission) (struct inode *, int);
+ int (*readlink) (struct dentry *, char __user *,int);
+ const char *(*get_link) (struct dentry *, struct inode *, void **);
+ int (*create) (struct inode *,struct dentry *,umode_t, bool);
int (*link) (struct dentry *,struct inode *,struct dentry *);
int (*unlink) (struct inode *,struct dentry *);
int (*symlink) (struct inode *,struct dentry *,const char *);
@@ -52,11 +55,6 @@ prototypes:
int (*mknod) (struct inode *,struct dentry *,umode_t,dev_t);
int (*rename) (struct inode *, struct dentry *,
struct inode *, struct dentry *, unsigned int);
- int (*readlink) (struct dentry *, char __user *,int);
- const char *(*get_link) (struct dentry *, struct inode *, void **);
- void (*truncate) (struct inode *);
- int (*permission) (struct inode *, int, unsigned int);
- int (*get_acl)(struct inode *, int);
int (*setattr) (struct dentry *, struct iattr *);
int (*getattr) (struct vfsmount *, struct dentry *, struct kstat *);
ssize_t (*listxattr) (struct dentry *, char *, size_t);
@@ -66,30 +64,33 @@ prototypes:
struct file *, unsigned open_flag,
umode_t create_mode, int *opened);
int (*tmpfile) (struct inode *, struct dentry *, umode_t);
+ int (*set_acl) (struct inode *, struct posix_acl *, int);
+ struct posix_acl *(*get_acl)(struct inode *, int);
locking rules:
all may block
i_mutex(inode)
lookup: yes
+permission: no (may not block if called in rcu-walk mode)
+readlink: no
+get_link: no
create: yes
link: yes (both)
-mknod: yes
+unlink: yes (both)
symlink: yes
mkdir: yes
-unlink: yes (both)
rmdir: yes (both) (see below)
-rename: yes (all) (see below)
-readlink: no
-get_link: no
+mknod: yes
+rename: yes (all) (see below)
setattr: yes
-permission: no (may not block if called in rcu-walk mode)
-get_acl: no
getattr: no
listxattr: no
fiemap: no
update_time: no
atomic_open: yes
tmpfile: no
+set_acl: yes
+get_acl: no
Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_mutex on
--
2.7.4
next prev parent reply other threads:[~2016-11-12 19:36 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-12 19:36 [RFC][PATCH 0/4] ovl: Do not hold s_vfs_rename_mutex during data copy up Amir Goldstein
2016-11-12 19:36 ` Amir Goldstein [this message]
2016-11-12 19:36 ` [RFC][PATCH 2/4] ovl: add helper ovl_dentry_is_upper() Amir Goldstein
2016-11-12 19:36 ` [RFC][PATCH 3/4] ovl: fold ovl_copy_up_truncate() into ovl_copy_up() Amir Goldstein
2016-12-03 17:04 ` Amir Goldstein
2016-12-05 14:51 ` Miklos Szeredi
2016-11-12 19:36 ` [RFC][PATCH 4/4] ovl: allow concurrent copy up data of different files Amir Goldstein
2016-11-15 15:56 ` Vivek Goyal
2016-11-15 19:20 ` Amir Goldstein
2016-11-15 21:57 ` Vivek Goyal
2016-11-16 5:27 ` Amir Goldstein
2016-11-20 8:27 ` Amir Goldstein
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=1478979364-10355-2-git-send-email-amir73il@gmail.com \
--to=amir73il@gmail.com \
--cc=koct9i@gmail.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-unionfs@vger.kernel.org \
--cc=miklos@szeredi.hu \
--cc=viro@zeniv.linux.org.uk \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).