From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeff Moyer Subject: Re: [PATCH][RFC]ext4 on 4k-sector drives without read-modify-write support Date: Mon, 28 Feb 2011 16:57:30 -0500 Message-ID: References: <20110228180925.GA28617@thunk.org> <20110228210541.GF28617@thunk.org> <20110228212221.GH28617@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: "Ted Ts'o" Return-path: Received: from mx1.redhat.com ([209.132.183.28]:15082 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753261Ab1B1V5i (ORCPT ); Mon, 28 Feb 2011 16:57:38 -0500 In-Reply-To: <20110228212221.GH28617@thunk.org> (Ted Ts'o's message of "Mon, 28 Feb 2011 16:22:21 -0500") Sender: linux-fsdevel-owner@vger.kernel.org List-ID: "Ted Ts'o" writes: > 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.) Sorry, I thought we were discussing devices that didn't do read-modify-write: > >> Unlike others drives with Advanced Format, it has not > >> read-modify-write logic, so it can only operate with 4k > >> blocks. Also, mkp noted that the theory of operation was to issue aligned units of 4k, but using 512 byte addressing. So, unless you want to keep a blacklist AND write a remapping layer, I'd say don't buy those drives. Cheers, Jeff