From: Eric Biggers <ebiggers@kernel.org>
To: "Fabio M. De Francesco" <fmdefrancesco@gmail.com>
Cc: linux-f2fs-devel@lists.sourceforge.net,
linux-fsdevel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH] f2fs: use memcpy_{to,from}_page() where possible
Date: Fri, 19 Aug 2022 15:36:31 -0700 [thread overview]
Message-ID: <YwAQb2GQ4GFl3mvz@sol.localdomain> (raw)
In-Reply-To: <4743896.GXAFRqVoOG@localhost.localdomain>
On Fri, Aug 19, 2022 at 01:11:41PM +0200, Fabio M. De Francesco wrote:
> > - src_addr = inline_data_addr(inode, ipage);
> > - dst_addr = kmap_atomic(page);
> > - memcpy(dst_addr, src_addr, MAX_INLINE_DATA(inode));
> > + memcpy_to_page(page, 0, inline_data_addr(inode, ipage),
> > + MAX_INLINE_DATA(inode));
> > flush_dcache_page(page);
>
> flush_dcache_page() is redundant here. memcpy_to_page() takes care to call it.
Done in v2.
> > - kaddr = kmap_atomic(page);
> > - memcpy(kaddr + offset, data, tocopy);
> > - kunmap_atomic(kaddr);
> > + memcpy_to_page(page, offset, data, tocopy);
> > flush_dcache_page(page);
>
> Same here.
Likewise.
>
> It looks like you forgot a conversion from kmap_atomic() in fs/f2fs/inline.c
> at line 266.
Also done in v2. I think I had skipped that one intentionally, but I must not
have looked closely because it converts just fine. Thanks!
- Eric
prev parent reply other threads:[~2022-08-19 22:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-18 22:54 Eric Biggers
2022-08-19 11:11 ` Fabio M. De Francesco
2022-08-19 22:36 ` Eric Biggers [this message]
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=YwAQb2GQ4GFl3mvz@sol.localdomain \
--to=ebiggers@kernel.org \
--cc=fmdefrancesco@gmail.com \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/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