isofs: Let mode and dmode mount options override rock ridge mode setting
Subsystems (3)
Jan Kara
maintainerPATCH 1/3 isofs: Let mode and dmode mount options override rock ridge mode setting
So far, permissions set via 'mode' and/or 'dmode' mount options were effective only if the medium had no rock ridge extensions (or was mounted without them). Add 'overriderockmode' mount option to indicate that these options should override permissions set in rock ridge extensions. Maybe this should be default but the current behavior is there since mount options were created so I think we should not change how they behave.
Signed-off-by Jan Kara <[email protected]>
--- Documentation/filesystems/isofs.txt | 9 +++++- fs/isofs/inode.c | 50 ++++++++++++++++++++++++++-------- fs/isofs/isofs.h | 3 ++ 3 files changed, 48 insertions(+), 14 deletions(-)
Documentation/filesystems/isofs.txt +7 -2
@@ -23,8 +23,13 @@ Mount options unique to the isofs filesystem. map=off Do not map non-Rock Ridge filenames to lower case map=normal Map non-Rock Ridge filenames to lower case map=acorn As map=normal but also apply Acorn extensions if present - mode=xxx Sets the permissions on files to xxx - dmode=xxx Sets the permissions on directories to xxx + mode=xxx Sets the permissions on files to xxx unless Rock Ridge + extensions set the permissions otherwise + dmode=xxx Sets the permissions on directories to xxx unless Rock Ridge + extensions set the permissions otherwise + overriderockperm Set permissions on files and directories according to + 'mode' and 'dmode' even though Rock Ridge extensions are + present. nojoliet Ignore Joliet extensions if they are present. norock Ignore Rock Ridge extensions if they are present. hide Completely strip hidden files from the file system.
fs/isofs/inode.c +38 -12
113 lines not on this page · raw message
fs/isofs/isofs.h +3 -0
@@ -50,6 +50,7 @@ struct isofs_sb_info {unsigned char s_nocompress;unsigned char s_hide;unsigned char s_showassoc; +unsigned char s_overriderockperm;mode_t s_fmode;mode_t s_dmode;
@@ -58,6 +59,8 @@ struct isofs_sb_info {struct nls_table *s_nls_iocharset;/* Native language support table */ }; +#define ISOFS_INVALID_MODE ((mode_t) -1) +static inline struct isofs_sb_info *ISOFS_SB (struct super_block *sb) {return sb->s_fs_info;
Signature · 1 line
1.6.0.2