Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755230Ab1D0SsA (ORCPT ); Wed, 27 Apr 2011 14:48:00 -0400 Received: from palinux.external.hp.com ([192.25.206.14]:43130 "EHLO mail.parisc-linux.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753642Ab1D0Sr6 (ORCPT ); Wed, 27 Apr 2011 14:47:58 -0400 Date: Wed, 27 Apr 2011 12:47:56 -0600 From: Matthew Wilcox To: Mike Frysinger Cc: Andrea Righi , Andrew Morton , Dave Chinner , Al Viro , Arnd Bergmann , linux-fsdevel@vger.kernel.org, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] fadvise: introduce POSIX_FADV_DONTNEED_FS Message-ID: <20110427184756.GB16716@parisc-linux.org> References: <1303928027-5100-1-git-send-email-andrea@betterlinux.com> <20110427183308.GA16716@parisc-linux.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1351 Lines: 28 On Wed, Apr 27, 2011 at 02:39:53PM -0400, Mike Frysinger wrote: > > Mmm ... what if I open /dev/sdxyz and call fadvise() on it? ??I think > > you end up flushing /dev's page cache entries, instead of the filesystem > > which is on /dev/sdxyz. > > i was thinking of that, but was trying to come up with situations > where there might not have a node to work on. fs's in a file go > through loop devs, dm/lvm have ones created, and flash fs's still have > a mtd block. how about network based fs's ? how you going to signal > dropping of pages for nfs or cifs or fuse ones ? For a regular file, mapping->host->i_sb points to the superblock this file is on. For a device, mapping->host->i_sb points to the superblock corresponding to this device. So it's always what we want. (hm, what about block devices not currently mounted? do we need to check whether mapping->host is NULL?) -- Matthew Wilcox Intel Open Source Technology Centre "Bill, look, we understand that you're interested in selling us this operating system, but compare it to ours. We can't possibly take such a retrograde step." -- 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/