reiserfs: journaled xattrs
Deadlocks are possible in the xattr code between the journal lock and the xattr sems. This patch implements journalling for xattr operations. The benefit is twofold: * It gets rid of the deadlock possibility by always ensuring that xattr write operations are initiated inside a transaction. * It corrects the problem where xattr backing files aren't considered any differently than normal files, despite the fact they are metadata. I discussed the added journal load with Chris Mason, and we decided that since xattrs (versus other journal activity) is fairly rare, the introduction of larger transactions to support journaled xattrs wouldn't be too big a deal. Signed-off-by: Jeff Mahoney <jeffm@suse.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:

committed by
Linus Torvalds

parent
48b32a3553
commit
0ab2621ebd
@@ -1615,6 +1615,10 @@ struct reiserfs_journal_header {
|
||||
#define JOURNAL_MAX_COMMIT_AGE 30
|
||||
#define JOURNAL_MAX_TRANS_AGE 30
|
||||
#define JOURNAL_PER_BALANCE_CNT (3 * (MAX_HEIGHT-2) + 9)
|
||||
#define JOURNAL_BLOCKS_PER_OBJECT(sb) (JOURNAL_PER_BALANCE_CNT * 3 + \
|
||||
2 * (REISERFS_QUOTA_INIT_BLOCKS(sb) + \
|
||||
REISERFS_QUOTA_TRANS_BLOCKS(sb)))
|
||||
|
||||
#ifdef CONFIG_QUOTA
|
||||
/* We need to update data and inode (atime) */
|
||||
#define REISERFS_QUOTA_TRANS_BLOCKS(s) (REISERFS_SB(s)->s_mount_opt & (1<<REISERFS_QUOTA) ? 2 : 0)
|
||||
|
Reference in New Issue
Block a user