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:10:44 -0500 Message-ID: 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: "Ted Ts'o" Return-path: Received: from mx1.redhat.com ([209.132.183.28]:51060 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754873Ab1B1VKw (ORCPT ); Mon, 28 Feb 2011 16:10:52 -0500 In-Reply-To: <20110228210541.GF28617@thunk.org> (Ted Ts'o's message of "Mon, 28 Feb 2011 16:05:41 -0500") Sender: linux-fsdevel-owner@vger.kernel.org List-ID: "Ted Ts'o" writes: > On Mon, Feb 28, 2011 at 03:19:21PM -0500, Martin K. Petersen wrote: >> Kind of, yes. But that involves teaching every ATA driver in $LEGACY_OS >> about 4KB logical blocks. There is little value is switching to 4KB >> logical blocks in the first place. So the claim is that it is easier to >> stick with 512-byte addressing, leave the I/O stack intact, and require >> the filesystem to always issue aligned units of 4KB. >> >> That saves the drive vendors from implementing RMW logic and puts the >> burden on us. Perfect deal. > > 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? Cheers, Jeff