Re: [PATCH 1/7] zonefs: Detect append writes at invalid locations

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

 



On 10.01.23 14:08, Damien Le Moal wrote:
> Using REQ_OP_ZONE_APPEND operations for synchronous writes to sequential
> files succeeds regardless of the zone write pointer position, as long as
> the target zone is not full. This means that if an external (buggy)
> application writes to the zone of a sequential file underneath the file
> system, subsequent file write() operation will succeed but the file size
> will not be correct and the file will contain invalid data written by
> another application.
> 
> Modify zonefs_file_dio_append() to check the written sector of an append
> write (returned in bio->bi_iter.bi_sector) and return -EIO if there is a
> mismatch with the file zone wp offset field. This change triggers a call
> to zonefs_io_error() and a zone check. Modify zonefs_io_error_cb() to
> not expose the unexpected data after the current inode size when the
> errors=remount-ro mode is used. Other error modes are correctly handled
> already.

This only happens on ZNS and null_blk, doesn't it? On SCSI the Zone Append
emulation should catch this error before.





[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