From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH v3] fs: Invalidate the cache for a parent block-device if fsync() is called for a partition Date: Thu, 26 Jan 2012 16:45:34 -0500 Message-ID: <20120126214534.GA9319@infradead.org> References: <4F213E1A.4060808@redhat.com> <1327584802-14298-1-git-send-email-ndevos@redhat.com> <20120126134051.6add3cd2.akpm@linux-foundation.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Niels de Vos , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Al Viro , Mikulas Patocka , Jeff Moyer , "Bryn M. Reeves" To: Andrew Morton Return-path: Content-Disposition: inline In-Reply-To: <20120126134051.6add3cd2.akpm@linux-foundation.org> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Thu, Jan 26, 2012 at 01:40:51PM -0800, Andrew Morton wrote: > The Right Thing To Do here is to make the kernel behave logically and > predictably, then modify the userspace tools. But if we're modifying > the userspace tools then we would just change userspace to issue a > BLKFLSBUF to /dev/sda and leave the kernel alone. The right fix is to make partition and whole disk access coherent, which is fairly simply: - create the block device inode/mapping per gendisk, and only reference count it per block_device - make sure blkdev_get_block(s) applies the correct offset if used on partitions