fsync: giving up on dirty on ufs partitions running vfs_write_suspend()
Andreas Longwitz
longwitz at incore.de
Fri Sep 22 15:46:48 UTC 2017
Konstantin Belousov wroze:
> On Fri, Sep 22, 2017 at 12:01:49PM +0200, Andreas Longwitz wrote:
>> Patch against HEAD:
> Of course I meant the patch which waits for secondary writers to pass.
>
>> --- vfs_default.c.orig 2017-09-22 11:56:26.950084000 +0200
>> +++ vfs_default.c 2017-09-22 11:58:33.211196000 +0200
>> @@ -690,6 +690,8 @@
>> bremfree(bp);
>> bawrite(bp);
>> }
>> + if( maxretry < 1000)
>> + DELAY(1000); /* 1 ms */
>> BO_LOCK(bo);
>> goto loop2;
>> }
Excuse me, but I don't have a patch which waits for secondary writers to
pass. As I posted before I have checked using a dtrace script, that the
counter bo->bo_dirty.bv_cnt (which is used by the kernel) always goes to
zero, when the secondary writes (as you explained: meaning number of
threads in vn_start_secondary_write) goes to zero. To be exact:
bo->bo_dirty.bv_cnt goes to zero one loop step later than
mnt_secondary_writes. But without bumping up maxres or introducing some
kind of DELAY we will sometimes trigger the "giving up on dirty"
message. First of all I prefer to get rid of this message. Your proposal
to check the secondary writes would be a further improvement of the code.
--
Andreas Longwitz
More information about the freebsd-fs
mailing list