From: Gao Xiang <hsiangkao@linux.alibaba.com>
To: Sandeep Dhavale <dhavale@google.com>
Cc: linux-erofs@lists.ozlabs.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 2/4] erofs: support unencoded inodes for fileio
Date: Sat, 31 Aug 2024 15:54:19 +0800 [thread overview]
Message-ID: <063f290b-be98-4dbc-8e44-1de5b0722f42@linux.alibaba.com> (raw)
In-Reply-To: <CAB=BE-SeOSTyScFMztwT-25u5ZEU_kMjbCBYhQES2NN4nAwb4Q@mail.gmail.com>
On 2024/8/31 12:25, Sandeep Dhavale wrote:
> On Thu, Aug 29, 2024 at 8:29 PM Gao Xiang <hsiangkao@linux.alibaba.com> wrote:
>>
>> Since EROFS only needs to handle read requests in simple contexts,
>> Just directly use vfs_iocb_iter_read() for data I/Os.
>>
>> Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
>> ---
>> v2:
>> - fix redundant refcount which cause hanging on chunked inodes.
>>
>> fs/erofs/Makefile | 1 +
>> fs/erofs/data.c | 50 +++++++++++-
>> fs/erofs/fileio.c | 181 ++++++++++++++++++++++++++++++++++++++++++++
>> fs/erofs/inode.c | 17 +++--
>> fs/erofs/internal.h | 7 +-
>> fs/erofs/zdata.c | 46 ++---------
>> 6 files changed, 251 insertions(+), 51 deletions(-)
>> create mode 100644 fs/erofs/fileio.c
>>
>> diff --git a/fs/erofs/Makefile b/fs/erofs/Makefile
>> index 097d672e6b14..4331d53c7109 100644
>> --- a/fs/erofs/Makefile
>> +++ b/fs/erofs/Makefile
>> @@ -7,4 +7,5 @@ erofs-$(CONFIG_EROFS_FS_ZIP) += decompressor.o zmap.o zdata.o zutil.o
>> erofs-$(CONFIG_EROFS_FS_ZIP_LZMA) += decompressor_lzma.o
>> erofs-$(CONFIG_EROFS_FS_ZIP_DEFLATE) += decompressor_deflate.o
>> erofs-$(CONFIG_EROFS_FS_ZIP_ZSTD) += decompressor_zstd.o
>> +erofs-$(CONFIG_EROFS_FS_BACKED_BY_FILE) += fileio.o
>> erofs-$(CONFIG_EROFS_FS_ONDEMAND) += fscache.o
>> diff --git a/fs/erofs/data.c b/fs/erofs/data.c
>> index 0fb31c588ae0..b4c07ce7a294 100644
>> --- a/fs/erofs/data.c
>> +++ b/fs/erofs/data.c
>> @@ -132,7 +132,7 @@ int erofs_map_blocks(struct inode *inode, struct erofs_map_blocks *map)
>> if (map->m_la >= inode->i_size) {
>> /* leave out-of-bound access unmapped */
>> map->m_flags = 0;
>> - map->m_plen = 0;
>> + map->m_plen = map->m_llen;
> Hi Gao,
> Is this change intentional? At out label, we set this again as err is 0.
Yes, that is intentional, we will return the post-EOF extent as
m_plen == map->m_llen == passed in m_llen and an unmapped extent
so that the logic can be simplified and it's still compatible.
Thanks,
Gao Xiang
next prev parent reply other threads:[~2024-08-31 7:54 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-30 3:28 [PATCH v2 1/4] erofs: add file-backed mount support Gao Xiang
2024-08-30 3:28 ` [PATCH v2 2/4] erofs: support unencoded inodes for fileio Gao Xiang
2024-08-31 0:19 ` Sandeep Dhavale
2024-08-31 2:54 ` Gao Xiang
2024-08-31 4:25 ` Sandeep Dhavale
2024-08-31 7:54 ` Gao Xiang [this message]
2024-09-01 20:47 ` Sandeep Dhavale
2024-09-04 6:56 ` Gao Xiang
2024-09-05 9:01 ` Chao Yu
2024-09-05 9:13 ` Gao Xiang
2024-08-30 3:28 ` [PATCH v2 3/4] erofs: support compressed " Gao Xiang
2024-09-01 20:47 ` Sandeep Dhavale
2024-09-05 9:01 ` Chao Yu
2024-09-05 9:14 ` Gao Xiang
2024-09-05 9:46 ` Chao Yu
2024-08-30 3:28 ` [PATCH v2 4/4] erofs: mark experimental fscache backend deprecated Gao Xiang
2024-09-01 20:48 ` Sandeep Dhavale
2024-09-05 9:03 ` Chao Yu
2024-08-31 0:30 ` [PATCH v2 1/4] erofs: add file-backed mount support Sandeep Dhavale
2024-08-31 3:00 ` Gao Xiang
2024-09-01 20:46 ` Sandeep Dhavale
2024-09-05 8:22 ` Chao Yu
2024-09-05 9:30 ` [PATCH v3 2/4] erofs: support unencoded inodes for fileio Gao Xiang
2024-09-05 9:44 ` Chao Yu
2024-09-24 9:21 ` [PATCH v2 1/4] erofs: add file-backed mount support Geert Uytterhoeven
2024-09-24 9:29 ` Gao Xiang
2024-09-30 14:18 ` Jan Kara
2024-09-30 14:22 ` Geert Uytterhoeven
2024-10-02 6:12 ` Christian Brauner
2024-10-02 11:25 ` Gao Xiang
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=063f290b-be98-4dbc-8e44-1de5b0722f42@linux.alibaba.com \
--to=hsiangkao@linux.alibaba.com \
--cc=dhavale@google.com \
--cc=linux-erofs@lists.ozlabs.org \
--cc=linux-kernel@vger.kernel.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
all inboxes | Powered by JetHome®