diff options
author | Darrick J. Wong <djwong@us.ibm.com> | 2012-04-29 18:31:10 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2012-04-29 18:31:10 -0400 |
commit | 814525f4df50a196464ce2c7abe91f693203060f (patch) | |
tree | 221de5b0331240ff6bc99a2dd7c48460e1305075 /fs/ext4/ioctl.c | |
parent | a9c4731780544d52b243bf46e4dd635c67fa9f84 (diff) |
ext4: calculate and verify inode checksums
This patch introduces to ext4 the ability to calculate and verify
inode checksums. This requires the use of a new ro compatibility flag
and some accompanying e2fsprogs patches to provide the relevant
features in tune2fs and e2fsck. The inode generation changes have
been integrated into this patch.
Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/ioctl.c')
-rw-r--r-- | fs/ext4/ioctl.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c index 6eee25591b81..feba55a225a6 100644 --- a/fs/ext4/ioctl.c +++ b/fs/ext4/ioctl.c | |||
@@ -152,6 +152,13 @@ flags_out: | |||
152 | if (!inode_owner_or_capable(inode)) | 152 | if (!inode_owner_or_capable(inode)) |
153 | return -EPERM; | 153 | return -EPERM; |
154 | 154 | ||
155 | if (EXT4_HAS_RO_COMPAT_FEATURE(inode->i_sb, | ||
156 | EXT4_FEATURE_RO_COMPAT_METADATA_CSUM)) { | ||
157 | ext4_warning(sb, "Setting inode version is not " | ||
158 | "supported with metadata_csum enabled."); | ||
159 | return -ENOTTY; | ||
160 | } | ||
161 | |||
155 | err = mnt_want_write_file(filp); | 162 | err = mnt_want_write_file(filp); |
156 | if (err) | 163 | if (err) |
157 | return err; | 164 | return err; |