mirror of
https://github.com/versity/scoutfs.git
synced 2026-01-03 10:55:20 +00:00
Queue trans work in our work queue
We went to the trouble of allocating a work queue with one work in flight but then didn't use it. We could have concurrent trans write func execution. Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
@@ -157,6 +157,11 @@ static int write_attempted(struct scoutfs_sb_info *sbi,
|
||||
return done;
|
||||
}
|
||||
|
||||
static void queue_trans_work(struct scoutfs_sb_info *sbi)
|
||||
{
|
||||
queue_work(sbi->trans_write_workq, &sbi->trans_write_work);
|
||||
}
|
||||
|
||||
/*
|
||||
* sync records the current dirty seq and write count and waits for
|
||||
* either to change. If there's nothing to write or the write returned
|
||||
@@ -170,7 +175,7 @@ int scoutfs_sync_fs(struct super_block *sb, int wait)
|
||||
int ret;
|
||||
|
||||
if (!wait) {
|
||||
schedule_work(&sbi->trans_write_work);
|
||||
queue_trans_work(sbi);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -179,7 +184,7 @@ int scoutfs_sync_fs(struct super_block *sb, int wait)
|
||||
attempt.count = sbi->trans_write_count;
|
||||
spin_unlock(&sbi->trans_write_lock);
|
||||
|
||||
schedule_work(&sbi->trans_write_work);
|
||||
queue_trans_work(sbi);
|
||||
|
||||
ret = wait_event_interruptible(sbi->trans_write_wq,
|
||||
write_attempted(sbi, &attempt));
|
||||
|
||||
Reference in New Issue
Block a user