]> Pileus Git - ~andy/linux/commit
ext4: move quota initialization out of inode allocation transaction
authorJan Kara <jack@suse.cz>
Fri, 19 Apr 2013 17:38:14 +0000 (13:38 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 19 Apr 2013 17:38:14 +0000 (13:38 -0400)
commiteb9cc7e16b32c898a1d715733c590f115aa0a099
tree0a8343dc815ce3480c2dbed7707126e15113de5d
parentfd03d8daf417fffbcb27fdb30d60f6c81ed813c8
ext4: move quota initialization out of inode allocation transaction

Inode allocation transaction is pretty heavy (246 credits with quotas
and extents before previous patch, still around 200 after it).  This is
mostly due to credits required for allocation of quota structures
(credits there are heavily overestimated but it's difficult to make
better estimates if we don't want to wire non-trivial assumptions about
quota format into filesystem).

So move quota initialization out of allocation transaction. That way
transaction for quota structure allocation will be started only if we
need to look up quota structure on disk (rare) and furthermore it will
be started for each quota type separately, not for all of them at once.
This reduces maximum transaction size to 34 is most cases and to 73 in
the worst case.

[ Modified by tytso to clean up the cleanup paths for error handling.
  Also use a separate call to ext4_std_error() for each failure so it
  is easier for someone who is debugging a problem in this function to
  determine which function call failed. ]

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
fs/ext4/ialloc.c
fs/ext4/namei.c