Skip to contentSkip to conversation

Btrfs: add a comment for fs_info->max_inline

PATCH Superseded Miao Xie 1 participant 1 message Jan 10, 2013 Btrfs file system

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Miao Xie

author
#0 lore raw

PATCH 4/11 Btrfs: add a comment for fs_info->max_inline

We need not add anything to protect fs_info->max_inline, but we need a comment to explain why we don't add a lock to protect it.

---
 fs/btrfs/ctree.h | 6 ++++++
 1 file changed, 6 insertions(+)
fs/btrfs/ctree.h +6 -0
index 745e7ad..3e672916 100644
@@ -1288,6 +1288,12 @@ struct btrfs_fs_info {
 	atomic64_t last_trans_log_full_commit;
 	unsigned long mount_opt;
 	unsigned long compress_type:4;
+	/*
+	 * It is a suggestive number, the read side is safe even it gets a
+	 * wrong number because we will write out the data into a regular
+	 * extent. The write side(mount/remount) is under ->s_umount lock,
+	 * so it is also safe.
+	 */
 	u64 max_inline;
 	u64 alloc_start;
 	struct btrfs_transaction *running_transaction;
Signature · 1 line
1.7.11.7