From: Christoph Hellwig <hch@infradead.org>
To: Jan Schmidt <list.btrfs@jan-o-sch.net>
Cc: linux-btrfs <linux-btrfs@vger.kernel.org>,
Christoph Hellwig <hch@infradead.org>,
Chris Mason <chris.mason@oracle.com>,
Arne Jansen <sensille@gmx.net>,
Andrea Gelmini <andrea.gelmini@gmail.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [GIT PULL] Btrfs pull request
Date: Wed, 9 Nov 2011 05:34:15 -0500 [thread overview]
Message-ID: <20111109103415.GA11064@infradead.org> (raw)
In-Reply-To: <4EBA560B.1070509@jan-o-sch.net>
On Wed, Nov 09, 2011 at 11:29:31AM +0100, Jan Schmidt wrote:
> Am 09.11.2011 08:48, schrieb Christoph Hellwig:
> >On Tue, Nov 08, 2011 at 08:07:01PM -0500, Chris Mason wrote:
> >>Looks like bio_add_page() is failing and we're getting the enomem from
> >>there. LVM is only letting us put one page in each bio.
> >
> >Yes, at the moment all bio based DM targets only allow single page I/O.
>
> Wait. If I got that correctly, each bio_add_page needs special
> ENOMEM treatment (assuming the target could always be a device
> mapper target), right?
Each bio_add_page caller needs to expect it can't add more than a
page worth of data. If you look at callers what write large amounts
of data (XFS, mpage code) you'll always see a pattern of:
bio = bio_alloc();
while (bytes_left) {
len = min(bytes_left, PAGE_SIZE);
bytes = bio_add_page(io, ..., len);
if (bytes < len) {
submit_bio(bio);
bio = bio_alloc();
}
update_indices();
}
submit_bio(bio);
next prev parent reply other threads:[~2011-11-09 10:34 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-06 18:38 [GIT PULL] Btrfs pull request Chris Mason
2011-11-06 19:29 ` Andrea Gelmini
2011-11-07 9:37 ` Arne Jansen
2011-11-07 9:49 ` Roman Mamedov
2011-11-07 9:57 ` Arne Jansen
2011-11-07 12:49 ` Andrea Gelmini
2011-11-07 12:42 ` Andrea Gelmini
2011-11-07 12:45 ` Arne Jansen
2011-11-07 12:50 ` Andrea Gelmini
2011-11-08 7:47 ` Arne Jansen
2011-11-09 1:07 ` Chris Mason
2011-11-09 7:48 ` Christoph Hellwig
2011-11-09 9:06 ` Arne Jansen
2011-11-09 10:11 ` Christoph Hellwig
2011-11-09 12:11 ` Chris Mason
2011-11-09 10:29 ` Jan Schmidt
2011-11-09 10:34 ` Christoph Hellwig [this message]
2011-11-09 10:49 ` Jan Schmidt
2011-11-09 12:12 ` Chris Mason
2011-11-07 0:35 ` Chris Mason
2011-11-08 17:55 ` Dan Merillat
2011-11-08 18:27 ` Chris Mason
2011-11-08 20:17 ` Chris Mason
2011-11-09 6:53 ` Dan Merillat
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=20111109103415.GA11064@infradead.org \
--to=hch@infradead.org \
--cc=andrea.gelmini@gmail.com \
--cc=chris.mason@oracle.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=list.btrfs@jan-o-sch.net \
--cc=sensille@gmx.net \
/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