On Wed, Dec 20, 2023 at 09:12:28AM -0800, Darrick J. Wong wrote: > From: Darrick J. Wong <djwong@xxxxxxxxxx> > > Not sure why block device targets don't get O_DIRECT in !buffered mode, > but it's misleading when the copy completes instantly only to stall > forever due to fsync-on-close. Adjust the "write last sector" code to > allocate a properly aligned buffer. > > In removing the onstack buffer for EOD writes, this also corrects the > buffer being larger than necessary -- the old code declared an array of > 32768 pointers, whereas all we really need is an aligned 32768-byte > buffer. Looks good: Reviewed-by: Christoph Hellwig <hch@xxxxxx>