Re: filesystem dead, xfs_repair won't help

Avi Kivity
2017-04-12T16:15:45Z

On 04/12/2017 06:45 PM, Christoph Hellwig wrote:
> On Wed, Apr 12, 2017 at 10:34:47AM -0500, Eric Sandeen wrote:
>> Is it safe to do that on a device that /actually/ has only 512 sectors?
> Except for NVMe none of the storage standards actually guarantees
> sector atomicy, although the whole storage stack traditionally relies on
> it..
>
> Maybe we should claim a 4k physical block size for NVMe devices that
> hab 512 byte LBAs and a "Atomic Write Unit Power Fail" setting of at
> least 8 so that the mkfs sector size logic triggers..

This preserves the ability to do O_DIRECT reads at 512 byte granularity,
yes? We make use of that (it's probably less important on NVMe; still
why waste bandwidth needlessly).