Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754907AbbKMU5g (ORCPT ); Fri, 13 Nov 2015 15:57:36 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45707 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754704AbbKMU5f (ORCPT ); Fri, 13 Nov 2015 15:57:35 -0500 From: Jeff Moyer To: Hannes Reinecke Cc: Jens Axboe , Alexander Graf , Christoph Hellwig , Ming Lei , linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/4] loop: Enable correct physical blocksize References: <1447143190-44589-1-git-send-email-hare@suse.de> <1447143190-44589-2-git-send-email-hare@suse.de> X-PGP-KeyID: 1F78E1B4 X-PGP-CertKey: F6FE 280D 8293 F72C 65FD 5A58 1FF8 A7CA 1F78 E1B4 X-PCLoadLetter: What the f**k does that mean? Date: Fri, 13 Nov 2015 15:57:33 -0500 In-Reply-To: <1447143190-44589-2-git-send-email-hare@suse.de> (Hannes Reinecke's message of "Tue, 10 Nov 2015 09:13:07 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1336 Lines: 33 Hi Hannes, Hannes Reinecke 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/