Re: [PATCH] block: reintroduce discard_zeroes_data sysfs file and BLKDISCARDZEROES

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

 



On Thu, Aug 17, 2017 at 10:41:43AM +0200, Lukas Czerner wrote:
> Ok, guarantee in this case is probably too strong expression. But you
> know what I mean, saying "hey I am not using those blocks, feel free to
> release them if you can". I did not encounter the need to be so strict
> about discard, after all, it's for the device benefit.

That's what the BLKDISCARD ioctl, or fallocate with the
FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE | FALLOC_FL_NO_HIDE_STALE
flags will do fr your.

> However there are device that do both (discard and zeroout) in discard
> request and that's what I am after. To be able to identify that's the
> case and take advantage. I think it's possible now with fallocate
> FALLOC_FL_PUNCH_HOLE, but I do not know anything in advance and I can't
> tell whether the device attempted to unmap as well even if it did.

With FALLOC_FL_PUNCH_HOLE you know that it is device offloaded.
We don't know that the device won't zero part or all of it, but
then again that was possible before when using BLKDISCARD as well.

Now after all that theory: is there a practial issue behind all
this?



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