Re: [dm-devel] [PATCH v2 1/3] block: add sysfs entry fordiscard_alignment

From: Vivek Goyal
Date: Tue Jul 03 2012 - 10:00:57 EST


On Tue, Jul 03, 2012 at 01:51:13PM +0200, Paolo Bonzini wrote:
> Il 03/07/2012 04:34, Vivek Goyal ha scritto:
> >> > The next patches will actually use the alignment, expose it in sysfs
> >> > for ease of debugging.
> >> >
> > Don't we already have discard_alignment exported as device attribute.
> >
> > /sys/block/<dev>/discard_alignment
>
> Ah, interesting, I missed it completely. I guess it's because queue/
> directories only exist for full disks, and the correct alignment varies
> for each partition. So this patch is unnecessary.

Partition discard_alignments are available in
/sys/block/<disk>/<partition>/discard_alignment.

That raises an interesting question for patch3. If the discard is happening to
a partition, shouldn't you be looking at partition discard_alignment
instead of always looking at queue discard_alignment?

Thanks
Vivek
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/