[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/50725 ffs -o discard crash/unmount safety issues
The following reply was made to PR kern/50725; it has been noted by GNATS.
From: David Holland <dholland-bugs%netbsd.org@localhost>
Subject: Re: kern/50725 ffs -o discard crash/unmount safety issues
Date: Wed, 28 Sep 2016 10:38:45 +0000
On Sat, Sep 24, 2016 at 10:45:01PM +0000, Jarom?r Dole?ek wrote:
> There is another interesting thing regarding wapbl + discard, which
> needs to be taken care of.
> In ffs_wapbl_sync_metadata() called from wapbl_flush(), the code loops
> over deallocblks and calls ffs_blkfree(). Then it calls ffs_cgupdate()
> to save the cg descriptors to disk, which makes it in turn queued for
> journal write.
> However, if discard is active, those ffs_blkfree() just register the
> discard and do not modify the cg's right away. This means that cgs are
> not saved as part of the transaction in the flush, and get to saved
> only on the next sync.
It's been (unrelatedly) pointed out in several places recently that in
addition to the problem that many drives ignore small discards,
apparently the underlying SATA operation requires waiting for all
other pending I/Os to complete. This is going to trash performance no
matter what software-level steps are taken.
Between these three problems I'm starting to think the current code
for -o discard should be deprecated/removed, and instead we want code
that runs once in a while and discards all free areas, maybe one
cylinder group at a time.
David A. Holland
Main Index |
Thread Index |