On Mon, Feb 17, 2020 at 06:00:23AM -0800, Christoph Hellwig wrote: > On Tue, Feb 04, 2020 at 04:47:43PM -0800, Darrick J. Wong wrote: > > From: Darrick J. Wong <darrick.wong@xxxxxxxxxx> > > > > Modify platform_flush_device so that we can return error status when > > device flushes fail. > > The change itself looks good: > > Reviewed-by: Christoph Hellwig <hch@xxxxxx> > > But the existing logic in platform_flush_device looks suspicious. > Even on a block device fsync is usually the right thing, so we > should unconditionally do that first. The BLKFLSBUF ioctl does some > rather weird things which I'm not sure we really want here, but if we > do I'd rather see if after we've flushed out the actual data.. BLKFLSBUF flushes the data and then shoots down the page cache, right? That's certainly odd, but I think (at least as far as old kernels go) we aren't actively losing data. However, I agree that we should fsync() files and block devices equally. --D