mirror of
https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git
synced 2024-11-28 20:44:08 +08:00
Add support for new default mount options for the journal data mode.
This commit is contained in:
parent
a49929b656
commit
4a959fe6f1
@ -1,5 +1,10 @@
|
||||
2002-10-20 Theodore Ts'o <tytso@valinux.com>
|
||||
|
||||
* e2p.h (e2p_string2mntopt), mntopts.c, ls.c (print_mntopts):
|
||||
Remove unneeded "compat" argument to e2p_string2mntopt().
|
||||
Add mount options for the journal data mode (journaled,
|
||||
ordered, writeback).
|
||||
|
||||
* feature.c, ls.c (list_super2): Add support for the
|
||||
meta_blockgroup filesystem format.
|
||||
|
||||
|
@ -42,6 +42,6 @@ const char *e2p_uuid2str(void *uu);
|
||||
const char *e2p_hash2string(int num);
|
||||
int e2p_string2hash(char *string);
|
||||
|
||||
const char *e2p_mntopt2string(int compat, unsigned int mask);
|
||||
const char *e2p_mntopt2string(unsigned int mask);
|
||||
int e2p_string2mntopt(char *string, unsigned int *mask);
|
||||
int e2p_edit_mntopts(const char *str, __u32 *mntopts, __u32 ok);
|
||||
|
@ -119,9 +119,15 @@ static void print_mntopts(struct ext2_super_block * s, FILE *f)
|
||||
__u32 mask = s->s_default_mount_opts, m;
|
||||
|
||||
fprintf(f, "Default mount options: ");
|
||||
if (mask & EXT3_DEFM_JMODE) {
|
||||
fprintf(f, " %s", e2p_mntopt2string(mask & EXT3_DEFM_JMODE));
|
||||
printed++;
|
||||
}
|
||||
for (i=0,m=1; i < 32; i++, m<<=1) {
|
||||
if (m & EXT3_DEFM_JMODE)
|
||||
continue;
|
||||
if (mask & m) {
|
||||
fprintf(f, " %s", e2p_mntopt2string(i, m));
|
||||
fprintf(f, " %s", e2p_mntopt2string(m));
|
||||
printed++;
|
||||
}
|
||||
}
|
||||
|
@ -27,10 +27,13 @@ static struct mntopt mntopt_list[] = {
|
||||
{ EXT2_DEFM_XATTR_USER, "user_xattr" },
|
||||
{ EXT2_DEFM_ACL, "acl" },
|
||||
{ EXT2_DEFM_UID16, "uid16" },
|
||||
{ 0, 0 },
|
||||
{ EXT3_DEFM_JMODE_DATA, "journal_data" },
|
||||
{ EXT3_DEFM_JMODE_ORDERED, "journal_data_ordered" },
|
||||
{ EXT3_DEFM_JMODE_WBACK, "journal_data_writeback" },
|
||||
{ 0, 0 },
|
||||
};
|
||||
|
||||
const char *e2p_mntopt2string(int compat, unsigned int mask)
|
||||
const char *e2p_mntopt2string(unsigned int mask)
|
||||
{
|
||||
struct mntopt *f;
|
||||
static char buf[20];
|
||||
@ -121,6 +124,8 @@ int e2p_edit_mntopts(const char *str, __u32 *mntopts, __u32 ok)
|
||||
return 1;
|
||||
if (ok && !(ok & mask))
|
||||
return 1;
|
||||
if (mask & EXT3_DEFM_JMODE)
|
||||
*mntopts &= ~EXT3_DEFM_JMODE;
|
||||
if (neg)
|
||||
*mntopts &= ~mask;
|
||||
else
|
||||
|
@ -1,5 +1,8 @@
|
||||
2002-10-20 Theodore Ts'o <tytso@valinux.com>
|
||||
|
||||
* ext2_fs.h (EXT3_DEFM_JMODE): Add new default mount options for
|
||||
the journal data mode.
|
||||
|
||||
* closefs.c (ext2fs_flush, write_bgdesc), ext2_fs.h, ext2fs.h,
|
||||
openfs.c (ext2fs_descriptor_block_loc, ext2fs_open), initialize.c
|
||||
(ext2fs_initialize), swapfs.c (ext2fs_swap_super): Add support for
|
||||
|
@ -511,6 +511,10 @@ struct ext2_super_block {
|
||||
#define EXT2_DEFM_XATTR_USER 0x0004
|
||||
#define EXT2_DEFM_ACL 0x0008
|
||||
#define EXT2_DEFM_UID16 0x0010
|
||||
#define EXT3_DEFM_JMODE 0x0060
|
||||
#define EXT3_DEFM_JMODE_DATA 0x0020
|
||||
#define EXT3_DEFM_JMODE_ORDERED 0x0040
|
||||
#define EXT3_DEFM_JMODE_WBACK 0x0060
|
||||
|
||||
/*
|
||||
* Structure of a directory entry
|
||||
|
Loading…
Reference in New Issue
Block a user