diff options
author | Eric Van Hensbergen <ericvh@kernel.org> | 2023-03-27 03:53:10 +0200 |
---|---|---|
committer | Eric Van Hensbergen <ericvh@kernel.org> | 2023-04-09 23:41:21 +0200 |
commit | 4eb3117888a923f6b9b1ad2dd093641c49a63ae5 (patch) | |
tree | 789a090dabce6ae9a4c6b557cfcfbe6417170215 /fs/9p/fid.h | |
parent | fs/9p: remove writeback fid and fix per-file modes (diff) | |
download | linux-4eb3117888a923f6b9b1ad2dd093641c49a63ae5.tar.xz linux-4eb3117888a923f6b9b1ad2dd093641c49a63ae5.zip |
fs/9p: Rework cache modes and add new options to Documentation
Switch cache modes to a bit-mask and use legacy
cache names as shortcuts. Update documentation to
include information on both shortcuts and bitmasks.
This patch also fixes missing guards related to fscache.
Update the documentation for new mount flags
and cache modes.
Signed-off-by: Eric Van Hensbergen <ericvh@kernel.org>
Diffstat (limited to 'fs/9p/fid.h')
-rw-r--r-- | fs/9p/fid.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/9p/fid.h b/fs/9p/fid.h index 11576e1364bf..0c51889a60b3 100644 --- a/fs/9p/fid.h +++ b/fs/9p/fid.h @@ -56,11 +56,9 @@ static inline void v9fs_fid_add_modes(struct p9_fid *fid, int s_flags, ((fid->qid.version == 0) && !(s_flags & V9FS_IGNORE_QV)) || (s_flags & V9FS_DIRECT_IO) || (f_flags & O_DIRECT)) { fid->mode |= P9L_DIRECT; /* no read or write cache */ - } else if ((s_cache < CACHE_WRITEBACK) || + } else if ((!(s_cache & CACHE_WRITEBACK)) || (f_flags & O_DSYNC) | (s_flags & V9FS_SYNC)) { fid->mode |= P9L_NOWRITECACHE; - } else if (s_cache == CACHE_LOOSE) { - fid->mode |= P9L_LOOSE; /* noncoherent cache */ } } #endif |