mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
fuse: signal that a fuse inode should exhibit local fs behaviors
Create a new fuse inode flag that indicates that the kernel should implement various local filesystem behaviors instead of passing vfs commands straight through to the fuse server and expecting the server to do all the work. For example, this means that we'll use the kernel to transform some ACL updates into mode changes, and later to do enforcement of the immutable and append iflags. Signed-off-by: "Darrick J. Wong" <djwong@kernel.org> Reviewed-by: Joanne Koong <joannelkoong@gmail.com> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
This commit is contained in:
committed by
Miklos Szeredi
parent
1ce120dcef
commit
28fec8b95e
@@ -239,6 +239,11 @@ enum {
|
||||
FUSE_I_BTIME,
|
||||
/* Wants or already has page cache IO */
|
||||
FUSE_I_CACHE_IO_MODE,
|
||||
/*
|
||||
* Client has exclusive access to the inode, either because fs is local
|
||||
* or the fuse server has an exclusive "lease" on distributed fs
|
||||
*/
|
||||
FUSE_I_EXCLUSIVE,
|
||||
};
|
||||
|
||||
struct fuse_conn;
|
||||
@@ -1055,7 +1060,7 @@ static inline struct fuse_conn *get_fuse_conn(struct inode *inode)
|
||||
return get_fuse_mount_super(inode->i_sb)->fc;
|
||||
}
|
||||
|
||||
static inline struct fuse_inode *get_fuse_inode(struct inode *inode)
|
||||
static inline struct fuse_inode *get_fuse_inode(const struct inode *inode)
|
||||
{
|
||||
return container_of(inode, struct fuse_inode, inode);
|
||||
}
|
||||
@@ -1097,6 +1102,13 @@ static inline bool fuse_is_bad(struct inode *inode)
|
||||
return unlikely(test_bit(FUSE_I_BAD, &get_fuse_inode(inode)->state));
|
||||
}
|
||||
|
||||
static inline bool fuse_inode_is_exclusive(const struct inode *inode)
|
||||
{
|
||||
const struct fuse_inode *fi = get_fuse_inode(inode);
|
||||
|
||||
return test_bit(FUSE_I_EXCLUSIVE, &fi->state);
|
||||
}
|
||||
|
||||
static inline struct folio **fuse_folios_alloc(unsigned int nfolios, gfp_t flags,
|
||||
struct fuse_folio_desc **desc)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user