lkml.org 
[lkml]   [2015]   [Nov]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 1/4] loop: Enable correct physical blocksize
Date
Hi Hannes,

Hannes Reinecke <hare@suse.de> writes:

> When running on files the physical blocksize is actually 4k,

How did you come to that conclusion? Are you basing it on the file
system block size? If so, that's configurable at mkfs time and can be
anything from 512 bytes to 64k on current in-tree file systems that I
know of (depending on platform, of course).

The main use for physical block size, as I understand it, is to allow
partitioning utilities to place partitions on physical block boundaries
of the underlying storage. The benefit of that is to avoid
read-modify-writes for I/O which is naturally sized and aligned. If we
carry that forward to loop, then I think it does makes sense to key off
of the file system block size, but the fact remains that 4k is not
universal.

So, I think the idea is sound, but you should be setting the physical
block size to sb->s_blocksize. And I don't see any reason why we
wouldn't do this by default, do you?

If you end up reposting this patch, would you mind including more of
this rationale in your commit message?

Thanks!
Jeff


\
 
 \ /
  Last update: 2015-11-13 22:21    [W:0.090 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site