aboutsummaryrefslogtreecommitdiffstats
path: root/fs/udf/udf_sb.h
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2009-03-16 13:27:37 -0400
committerJan Kara <jack@suse.cz>2009-04-02 07:36:28 -0400
commit146bca72c7e6ba52de82a63b1fce7934dc103dbc (patch)
treefee0aff001a5d5226518f0b67232f083f0931209 /fs/udf/udf_sb.h
parent40346005166329bc4b53e0c564aff3968c1ddaa0 (diff)
udf: Don't write integrity descriptor too often
We update information in logical volume integrity descriptor after each allocation (as LVID contains free space, number of directories and files on disk etc.). If the filesystem is on some phase change media, this leads to its quick degradation as such media is able to handle only 10000 overwrites or so. We solve the problem by writing new information into LVID only on umount, remount-ro and sync. This solves the problem at the price of longer media inconsistency (previously media became consistent after pdflush flushed dirty LVID buffer) but that should be acceptable. Report by and patch written in cooperation with Rich Coe <Richard.Coe@med.ge.com>. Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/udf/udf_sb.h')
-rw-r--r--fs/udf/udf_sb.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/udf/udf_sb.h b/fs/udf/udf_sb.h
index 46fea3ea70a9..d113b72c2768 100644
--- a/fs/udf/udf_sb.h
+++ b/fs/udf/udf_sb.h
@@ -148,6 +148,8 @@ struct udf_sb_info {
148 struct inode *s_vat_inode; 148 struct inode *s_vat_inode;
149 149
150 struct mutex s_alloc_mutex; 150 struct mutex s_alloc_mutex;
151 /* Protected by s_alloc_mutex */
152 unsigned int s_lvid_dirty;
151}; 153};
152 154
153static inline struct udf_sb_info *UDF_SB(struct super_block *sb) 155static inline struct udf_sb_info *UDF_SB(struct super_block *sb)