From: Toshiyuki Okajima <toshi.okajima@jp.fujitsu.com>
To: Jan Kara <jack@suse.cz>
Cc: "Theodore Ts'o" <tytso@mit.edu>,
Ext4 Developers List <linux-ext4@vger.kernel.org>,
linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH -v3] vfs: add releasepages hooks to block devices which can be used by file systems
Date: Thu, 18 Dec 2008 14:15:25 +0900 [thread overview]
Message-ID: <4949DC6D.3050908@jp.fujitsu.com> (raw)
In-Reply-To: <20081217153940.GA6495@atrey.karlin.mff.cuni.cz>
Hi,
> Hello,
>
> > > From: Toshiyuki Okajima <toshi.okajima@jp.fujitsu.com>
> > >
> > > Implement blkdev_releasepage() to release the buffer_heads and page
> > > after we release private data which belongs to a client of the block
> > > device, such as a filesystem.
> > >
> > > blkdev_releasepage() call the client's releasepage() which is
> > > registered by blkdev_register_client_releasepage() to release its
> > > private data.
> Yes, this is IMO the right fix. I'm just wondering about the fact that we
> can't block in the client_releasepage(). That seems to be caused by the fact
> that we need to be protected against client_releasepage() callback changes
> which essentially means umount, right? I'm not saying I have a better solution
> but introducing such limitation seems stupid just because of umount...
>
> Honza
>
Difference between v2 and v3 in blkdev_releasepage:
< ret = (*ei->client_releasepage)(ei->client, page, wait);
< else
--
> /*
> * Since we are holding a spinlock (ei->client_lock),
> * make sure the client_releasepage function
> * understands that it must not block.
> */
> ret = (*ei->client_releasepage)(ei->client, page,
> wait & ~__GFP_WAIT);
> else
Ask for clarification.
Which of the following do you mean:
1) If using a spinlock in client_releasepage() is only for mount/umount,
this implementation is not wise.
2) There is the fact that a spinlock is necessary for blkdev_releasepage().
This fact prevents us from making various implementations of
client_releasepage().
(Without a spinlock, we can implement a client_releasepage() which can release
the buffers with a sleep. As a result, it may enable more buffers release than
before.)
There is the fact that a filesystem can be mounted on several places,
and the lock mechanism is absolutely necessary for this fact.
I also think we are sad that we cannot implement various implementations for
client_releasepage(). But now I cannot imagine what to do for
a client_releasepage() which can sleep, too...
Regards,
Toshiyuki Okajima
next prev parent reply other threads:[~2008-12-18 5:15 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20081212062148.GJ10890@mit.edu>
2008-12-12 17:52 ` [PATCH -v3] vfs: add releasepages hooks to block devices which can be used by file systems Theodore Ts'o
2008-12-12 17:52 ` [PATCH -v3] ext3: provide function to release metadata pages under memory pressure Theodore Ts'o
2008-12-12 17:52 ` [PATCH -v3] ext4: " Theodore Ts'o
2008-12-17 15:39 ` [PATCH -v3] vfs: add releasepages hooks to block devices which can be used by file systems Jan Kara
2008-12-18 5:15 ` Toshiyuki Okajima [this message]
2008-12-18 13:12 ` Jan Kara
2008-12-18 14:54 ` Theodore Tso
2008-12-18 16:38 ` Jan Kara
2008-12-19 5:15 ` Toshiyuki Okajima
2008-12-26 5:01 ` Al Viro
[not found] ` <1230995358-24013-1-git-send-email-tytso@mit.edu>
2009-01-03 15:09 ` [PATCH 1/3] add releasepage " Theodore Ts'o
2009-01-03 15:09 ` [PATCH 2/3] ext3: provide function to release metadata pages under memory pressure Theodore Ts'o
2009-01-03 15:09 ` [PATCH 3/3] ext4: " Theodore Ts'o
2009-01-05 8:16 ` [PATCH 1/3] add releasepage hooks to block devices which can be used by file systems Toshiyuki Okajima
2009-01-05 16:05 ` Theodore Tso
2009-01-06 4:07 ` Toshiyuki Okajima
2009-01-06 4:29 ` Theodore Tso
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=4949DC6D.3050908@jp.fujitsu.com \
--to=toshi.okajima@jp.fujitsu.com \
--cc=jack@suse.cz \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=tytso@mit.edu \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).