summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeremy Condra <gcondra@google.com>2014-02-12 15:34:20 -0800
committerGeremy Condra <gcondra@google.com>2014-02-13 13:46:41 -0800
commit4fdc006f6f16109d498454834ff8738a3b5ad081 (patch)
tree347cf672c78f11f83facde81d606896e0843ebff
parentfb2fc9e55a52c50adfb5b62ba1b70e8dac646ab4 (diff)
downloadextras-4fdc006f6f16109d498454834ff8738a3b5ad081.tar.gz
Set s_flags to 2 to prevent a write on first mount.
The s_flags field is used to indicate whether characters are signed or unsigned, which differs between ARM and x86 targets. Setting this value to 0 causes the correct value for the target to be written back to the superblock on first mount, even if the fs is marked read only. Since this value is only used to ensure interoperability with 2.4 series kernels (which we don't need) in dirhash (which we don't use), we'll just set it to 2 to prevent the write. Change-Id: I92698235909791fb5f423cfd61ff5299307a8f97
-rw-r--r--ext4_utils/ext4_utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext4_utils/ext4_utils.c b/ext4_utils/ext4_utils.c
index 2c79da93..3755fee1 100644
--- a/ext4_utils/ext4_utils.c
+++ b/ext4_utils/ext4_utils.c
@@ -208,7 +208,7 @@ void ext4_fill_in_sb()
EXT4_GOOD_OLD_INODE_SIZE;
sb->s_want_extra_isize = sizeof(struct ext4_inode) -
EXT4_GOOD_OLD_INODE_SIZE;
- sb->s_flags = 0;
+ sb->s_flags = 2;
sb->s_raid_stride = 0;
sb->s_mmp_interval = 0;
sb->s_mmp_block = 0;