All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <jens.axboe@oracle.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>,
	linux-fsdevel@vger.kernel.org,
	Kernel development list <linux-kernel@vger.kernel.org>
Subject: Re: Block device files and the page cache
Date: Wed, 17 Mar 2010 11:22:52 +0100	[thread overview]
Message-ID: <20100317102252.GT5768@kernel.dk> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1003161258280.1307-100000@iolanthe.rowland.org>

On Tue, Mar 16 2010, Alan Stern wrote:
> Jens and Al:
> 
> Simple testing seems to show that when a program closes a file
> descriptor for a block device file, the release method in the device
> driver's block_device_operations structure doesn't get called (and the
> close(2) system call doesn't return) until all the dirty pages for that 
> device have been written out.
> 
> Can anyone confirm that this always happens?  Where in the kernel 
> source is this handled?

Alan, see fs/block_dev.c:__blkdev_put(). The last put of the device will
sync the device before calling fops->release().

-- 
Jens Axboe


  reply	other threads:[~2010-03-17 10:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-16 17:08 Block device files and the page cache Alan Stern
2010-03-17 10:22 ` Jens Axboe [this message]
2010-03-17 15:30   ` Alan Stern

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100317102252.GT5768@kernel.dk \
    --to=jens.axboe@oracle.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.