From: Jan Kara <jack@suse.cz>
To: Liu Bo <bo.li.liu@oracle.com>
Cc: linux-fsdevel@vger.kernel.org, Jan Kara <jack@suse.cz>,
Ross Zwisler <ross.zwisler@linux.intel.com>
Subject: Re: [PATCH] DAX: use proper length when the range is not aligned to PAGE_SIZE
Date: Fri, 4 Nov 2016 22:48:22 +0100 [thread overview]
Message-ID: <20161104214822.GA17647@quack2.suse.cz> (raw)
In-Reply-To: <1478287031-3303-1-git-send-email-bo.li.liu@oracle.com>
On Fri 04-11-16 12:17:11, Liu Bo wrote:
> Currently if we write to [2k, 6k] where pos is 2k and end is 6k,
> get_block() will be called twice, but we can save one get_block
> by sending two blocks together to get_block.
>
> Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Thanks for the patch but this code is going to be ripped out soon (in the
next merge window) in favor of iomap DAX implementation. So there's not
much point in fixing this...
Honza
> ---
> fs/dax.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/dax.c b/fs/dax.c
> index 53eb6a0..8d4bd5f 100644
> --- a/fs/dax.c
> +++ b/fs/dax.c
> @@ -172,7 +172,7 @@ static ssize_t dax_io(struct inode *inode, struct iov_iter *iter,
> long size;
>
> if (pos == bh_max) {
> - bh->b_size = PAGE_ALIGN(end - pos);
> + bh->b_size = PAGE_ALIGN(end - (pos - first));
> bh->b_state = 0;
> rc = get_block(inode, block, bh, rw == WRITE);
> if (rc)
> --
> 2.5.5
>
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
next prev parent reply other threads:[~2016-11-04 21:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-04 19:17 [PATCH] DAX: use proper length when the range is not aligned to PAGE_SIZE Liu Bo
2016-11-04 21:48 ` Jan Kara [this message]
2016-11-04 23:55 ` Liu Bo
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=20161104214822.GA17647@quack2.suse.cz \
--to=jack@suse.cz \
--cc=bo.li.liu@oracle.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=ross.zwisler@linux.intel.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 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.