aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/quota.h
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2010-04-27 18:22:30 -0400
committerJan Kara <jack@suse.cz>2010-05-21 13:30:46 -0400
commitf64dd44eb748438783b10b3f7a4968d2656a3c95 (patch)
tree21d73e0ed7140c8a61331eacd65157cc0983a16d /fs/ocfs2/quota.h
parentbc8e5f07392f05c47c8bdeff4f7098db440d065c (diff)
ocfs2: Do not map blocks from local quota file on each write
There is no need to map offset of local dquot structure to on disk block in each quota write. It is enough to map it just once and store the physical block number in quota structure in memory. Moreover this simplifies locking as we do not have to take ip_alloc_sem from quota write path. Acked-by: Joel Becker <Joel.Becker@oracle.com> Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/ocfs2/quota.h')
-rw-r--r--fs/ocfs2/quota.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ocfs2/quota.h b/fs/ocfs2/quota.h
index 123bc520a2c0..e22d2935128e 100644
--- a/fs/ocfs2/quota.h
+++ b/fs/ocfs2/quota.h
@@ -23,6 +23,7 @@
23struct ocfs2_dquot { 23struct ocfs2_dquot {
24 struct dquot dq_dquot; /* Generic VFS dquot */ 24 struct dquot dq_dquot; /* Generic VFS dquot */
25 loff_t dq_local_off; /* Offset in the local quota file */ 25 loff_t dq_local_off; /* Offset in the local quota file */
26 u64 dq_local_phys_blk; /* Physical block carrying quota structure */
26 struct ocfs2_quota_chunk *dq_chunk; /* Chunk dquot is in */ 27 struct ocfs2_quota_chunk *dq_chunk; /* Chunk dquot is in */
27 unsigned int dq_use_count; /* Number of nodes having reference to this entry in global quota file */ 28 unsigned int dq_use_count; /* Number of nodes having reference to this entry in global quota file */
28 s64 dq_origspace; /* Last globally synced space usage */ 29 s64 dq_origspace; /* Last globally synced space usage */
@@ -104,6 +105,8 @@ int ocfs2_lock_global_qf(struct ocfs2_mem_dqinfo *oinfo, int ex);
104void ocfs2_unlock_global_qf(struct ocfs2_mem_dqinfo *oinfo, int ex); 105void ocfs2_unlock_global_qf(struct ocfs2_mem_dqinfo *oinfo, int ex);
105int ocfs2_read_quota_block(struct inode *inode, u64 v_block, 106int ocfs2_read_quota_block(struct inode *inode, u64 v_block,
106 struct buffer_head **bh); 107 struct buffer_head **bh);
108int ocfs2_read_quota_phys_block(struct inode *inode, u64 p_block,
109 struct buffer_head **bh);
107 110
108extern const struct dquot_operations ocfs2_quota_operations; 111extern const struct dquot_operations ocfs2_quota_operations;
109extern struct quota_format_type ocfs2_quota_format; 112extern struct quota_format_type ocfs2_quota_format;