Re: [PATCH 05/18] [PATCH] BLOCK: Don't call block_sync_page() from AFS [try #4]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Aug 27, 2006 at 02:21:36PM -0700, Chris Wedgwood wrote:
> On Fri, Aug 25, 2006 at 08:37:10PM +0100, David Howells wrote:
> 
> > The AFS filesystem specifies block_sync_page() as its sync_page
> > address op, which needs to be checked, and so is commented out for
> > the moment.
> 
> Wouldn't it be better to just let the link/build fail so someone who
> groks AFS internals can look into this?

David wrote most of this code.  But in fact one doesn't need AFS knowledge
to see that it's not needed.

Take a look at block_sync_page:

void block_sync_page(struct page *page)
{
	struct address_space *mapping;

	smp_mb();
	mapping = page_mapping(page);
	if (mapping)
		blk_run_backing_dev(mapping->backing_dev_info, page);
}

so it's a wrapper around blk_run_backing_dev:

static inline void blk_run_backing_dev(struct backing_dev_info *bdi,
				       struct page *page)
{
	if (bdi && bdi->unplug_io_fn)
		bdi->unplug_io_fn(bdi, page);
}

AFS never sets a backing_dev_info on it's own and thus uses
&default_backing_dev_info which sets the unplug_io_fn to
default_unplug_io_fn.  default_unplug_io_fn is a no-op, and thus
block_sync_page does nothing for AFS.

It thus can be safely removed, even without the #if 0

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux