Re: [PATCH] sys/block: Add discard_support entry

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

 



>>>>> "Lukas" == Lukas Czerner <lczerner@xxxxxxxxxx> writes:

Lukas,

Lukas> So is that documented somewhere ? Because to me it is really not
Lukas> obvious whether 0 means that the device does not support discard,
Lukas> or the device just does not report discard_max_bytes at all.

discard_max_bytes does not necessarily correspond to a single value
reported by the device. Not all device types have the notion of such a
setting.

discard_max_bytes is calculated at the bottom of the stack depending on
a combination of heuristics and metrics reported by the device. The same
goes for granularity and alignment.

So I guess the important thing here is that these values may or may not
correspond directly to the underlying device (hopefully they will
:). But the topology information *itself* is the interface. That's the
whole point. To detach the top of the stack from the intricacies of the
hardware.

You should never have to ask yourself whether a device supports
reporting discard_max_bytes. If a device supports discard then
discard_max_bytes will be set. Always. Same goes for granularity and
alignment. Regardless of whether the device reports these values or
not. We'll fill out the blanks.

This is true for the rest of the topology information as well. If the
device does not report a physical block size (most don't) we'll set it
to match the logical block size. Etc.

-- 
Martin K. Petersen	Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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