Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757740Ab0BXUJT (ORCPT ); Wed, 24 Feb 2010 15:09:19 -0500 Received: from iolanthe.rowland.org ([192.131.102.54]:57995 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1757442Ab0BXUJS (ORCPT ); Wed, 24 Feb 2010 15:09:18 -0500 Date: Wed, 24 Feb 2010 15:09:16 -0500 (EST) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: Jens Axboe cc: linux-pm , linux-kernel Subject: Re: Testing for dirty buffers on a block device In-Reply-To: <20100224190942.GG1025@kernel.dk> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 929 Lines: 23 On Wed, 24 Feb 2010, Jens Axboe wrote: > > > But if you wanted, I guess the only way would be to lookup > > > dirty/writeback pages on the bdev inode mapping. For that you'd need the > > > bdev, not the gendisk or the queue though. > > > > I can get the bdev from the gendisk by calling bdget_disk() with a > > partition number of 0, right? What would the next step be? Would this > > check for dirty pages associated with any of the partitions or would it > > only look at pages associated with the inode for the entire disk? > > It would cover the entire bdev. Okay, so once I've got the bdev, how do I look up the dirty/writeback pages on the inode mapping? Alan Stern -- 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/