* [PATCH] f2fs: don't commit quota files
@ 2017-10-10 22:53 Jaegeuk Kim
0 siblings, 0 replies; only message in thread
From: Jaegeuk Kim @ 2017-10-10 22:53 UTC (permalink / raw)
To: linux-kernel, linux-fsdevel, linux-f2fs-devel; +Cc: Jaegeuk Kim
We don't need to commit every quota changes, since it only recovers fsynced
data. So, we need to rely on quotacheck to fix any inconsistency.
This also tries to resolve deadlock condition as follows.
- f2fs_write_begin
- f2fs_reserve_block
- mutex(node_change)
- dquot_claim_space_nodirty
- f2fs_mark_dquot_dirty
- dquot_commit
- mutex_lock()
- f2fs_setattr
- dquot_transfer
- dqget
- dquot_acquire
- write_blk
- f2fs_quota_write
- f2fs_write_begin
- mutex(node_change)
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
fs/f2fs/super.c | 16 +---------------
1 file changed, 1 insertion(+), 15 deletions(-)
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 85ba56ac34f2..5268690dd219 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -1641,20 +1641,6 @@ void f2fs_quota_off_umount(struct super_block *sb)
f2fs_quota_off(sb, type);
}
-static int f2fs_mark_dquot_dirty(struct dquot *dquot)
-{
- struct super_block *sb = dquot->dq_sb;
- struct f2fs_sb_info *sbi = F2FS_SB(sb);
-
- if (f2fs_sb_has_quota_ino(sb) ||
- sbi->s_qf_names[USRQUOTA] || sbi->s_qf_names[GRPQUOTA]) {
- dquot_mark_dquot_dirty(dquot);
- return dquot_commit(dquot);
- } else {
- return dquot_mark_dquot_dirty(dquot);
- }
-}
-
int f2fs_get_projid(struct inode *inode, kprojid_t *projid)
{
*projid = F2FS_I(inode)->i_projid;
@@ -1666,7 +1652,7 @@ static const struct dquot_operations f2fs_quota_operations = {
.write_dquot = dquot_commit,
.acquire_dquot = dquot_acquire,
.release_dquot = dquot_release,
- .mark_dirty = f2fs_mark_dquot_dirty,
+ .mark_dirty = dquot_mark_dquot_dirty,
.write_info = dquot_commit_info,
.alloc_dquot = dquot_alloc,
.destroy_dquot = dquot_destroy,
--
2.14.0.rc1.383.gd1ce394fe2-goog
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2017-10-10 22:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-10 22:53 [PATCH] f2fs: don't commit quota files Jaegeuk Kim
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).