Re: virtio-blk/ext4 error handling for host-side ENOSPC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The corresponding proposal to virtio-spec is here:
https://lore.kernel.org/virtio-comment/20240618081858.2795400-1-keiichiw@xxxxxxxxxxxx/T/#t

Best,
Keiichi

On Mon, Jun 17, 2024 at 12:34 PM Keiichi Watanabe <keiichiw@xxxxxxxxxxxx> wrote:
>
> Hi,
>
> I'm using ext4 over virtio-blk for VMs, and I'd like to discuss the
> situation where the host storage gets full.
> Let's say you create a disk image file formatted with ext4 on the host
> side as a sparse file and share it with the guest using virtio-blk.
> When the host storage is full and the sparse file cannot be expanded
> any further, the guest will know the error when it flushes disk
> caches.
> In the current implementation, the VMM's virtio-blk device returns
> VIRTIO_BLK_S_IOERR, and the virtio-blk driver converts it to
> BLK_STS_IOERR. Then, the ext4 module calls mapping_set_error for that
> area.
>
> However, the host's ENOSPC may be recoverable. For example, if a host
> service periodically deletes cache files, it'd be nice if the guest
> kernel can wait a while and then retry flushing.
> So, I wonder if we can't have a special handling for host-side's
> ENOSPC in virtio-blk and ext4.
>
> My idea is like this:
> First, (1) define a new error code, VIRTIO_BLK_S_ENOSPC, in
> virtio-blk. Then, (2) if the guest file system receives this error
> code, periodically retry flushing. We may want to make the retry limit
> via a mount option or something.
>
> What do you think of this idea? Also, has anything similar been attempted yet?
> Thanks in advance.
>
> Best,
> Keiichi





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux