From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ted Ts'o Subject: Re: [PATCH][RFC]ext4 on 4k-sector drives without read-modify-write support Date: Mon, 28 Feb 2011 16:22:21 -0500 Message-ID: <20110228212221.GH28617@thunk.org> References: <20110228180925.GA28617@thunk.org> <20110228210541.GF28617@thunk.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "Martin K. Petersen" , Ibragimov Rinat , linux-fsdevel@vger.kernel.org To: Jeff Moyer Return-path: Received: from li9-11.members.linode.com ([67.18.176.11]:59512 "EHLO test.thunk.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755194Ab1B1VW3 (ORCPT ); Mon, 28 Feb 2011 16:22:29 -0500 Content-Disposition: inline In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Mon, Feb 28, 2011 at 04:10:44PM -0500, Jeff Moyer wrote: > > So it there a reliable way to detect that disk drives that don't have > > the Read-Modify-Write logic? If that can be reflected up the I/O > > layer I can have mke2fs enforce that restriction, which currently we > > only enforce if the logical blocksize is 4k. > > That's not enough, I'm afraid. How do you deal with O_DIRECT, for > example? The drives do the read/modify/write, so O_DIRECT works fine from the OS's perspective. There is some risk of torn pages if you get a crash at the wrong moment, but that's true whenver you have a misaligned partition. (At least for the drives that do the RMW in the disk firmware.) - Ted