mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Yan, Zheng" <zyan@redhat.com>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	Yan@ZenIV.linux.org.uk, Zhu@ZenIV.linux.org.uk,
	Caifeng <zhucaifeng@unissoft-nj.com>
Subject: Re: [git pull] vfs fix
Date: Mon, 28 Nov 2016 16:54:17 +0800	[thread overview]
Message-ID: <48961E91-ECF5-4EC4-91F2-4FF270133927@redhat.com> (raw)
In-Reply-To: <20161127025113.GX1555@ZenIV.linux.org.uk>


> On 27 Nov 2016, at 10:51, Al Viro <viro@ZenIV.linux.org.uk> wrote:
> 
> On Sun, Nov 27, 2016 at 02:25:09AM +0000, Al Viro wrote:
> 
>> Anyway, leaving that BUG_ON() had been wrong; I can send a followup
>> massaging that thing as you've suggested, if you are interested in
>> that.  But keep in mind that the whole iov_iter_get_pages...() calling
>> conventions are going to be changed, hopefully soon.
> 
> BTW, speaking of iov_iter_get_pages_alloc() callers and splice:
> "ceph: combine as many iovec as possile into one OSD request" has added
> static size_t dio_get_pagev_size(const struct iov_iter *it)
> {
>    const struct iovec *iov = it->iov;
>    const struct iovec *iovend = iov + it->nr_segs;
>    size_t size;
> 
>    size = iov->iov_len - it->iov_offset;
>    /*
>     * An iov can be page vectored when both the current tail
>     * and the next base are page aligned.
>     */
>    while (PAGE_ALIGNED((iov->iov_base + iov->iov_len)) &&
>           (++iov < iovend && PAGE_ALIGNED((iov->iov_base)))) {
>        size += iov->iov_len;
>    }
>    dout("dio_get_pagevlen len = %zu\n", size);
>    return size;
> }

The read/write interface for ceph cluster accepts page vector. But we can only specify offset for the first page. Except the first and last pages, all other pages must be full size. This function finds size of pages that satisfy this requirement

Regards
Yan, Zheng

> 
> ... with 'it' possibly being bio_vec-backed iterator.  Could somebody
> explain what that code is trying to do?
> 
> I would really like to hear details - I'm not saying that the goal mentioned
> in the commit message is worthless, but I don't know ceph codebase well
> enough to tell what would be a good way to implement that.  In its current
> form it's obviously broken.

  parent reply	other threads:[~2016-11-28  8:54 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-27  1:13 Al Viro
2016-11-27  1:48 ` Linus Torvalds
2016-11-27  2:25   ` Al Viro
2016-11-27  2:51     ` Al Viro
2016-11-27  3:04       ` Al Viro
2016-11-28  8:54       ` Yan, Zheng [this message]
2016-11-27  2:53     ` Linus Torvalds
  -- strict thread matches above, loose matches on Subject: below --
2016-03-31  4:27 Al Viro
2015-05-31 21:37 Al Viro
2011-11-22 17:44 Al Viro
2011-11-22 17:48 ` Linus Torvalds
2011-11-22 21:09   ` Al Viro
2011-11-22 21:24     ` Linus Torvalds
2011-08-07  8:54 Al Viro
2011-02-24  7:20 Al Viro

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=48961E91-ECF5-4EC4-91F2-4FF270133927@redhat.com \
    --to=zyan@redhat.com \
    --cc=Yan@ZenIV.linux.org.uk \
    --cc=Zhu@ZenIV.linux.org.uk \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=viro@ZenIV.linux.org.uk \
    --cc=zhucaifeng@unissoft-nj.com \
    /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

all inboxes | Powered by JetHome®