Re: [PATCH 5/5] brd: zero data for discard that is not aligned to page

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

 



On Fri, Apr 18, 2025 at 05:38:26PM +0800, Yu Kuai wrote:
> From: Yu Kuai <yukuai3@xxxxxxxxxx>
> 
> Currently brd_do_discard() will just skip unaligned sectors, and in this
> case user will still get old data after discard. Fix this by writing
> zero data to unaligned sectors.

Which is perfectly fine with discard semantics and that of the
underlying primitives in storage standards.  If you need guaranteed
zeroing you need to implement the write zeroes operation.





[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux