From: Jan Kara <jack@suse.cz>
To: Zhang Yi <yi.zhang@huawei.com>
Cc: linux-ext4@vger.kernel.org, tytso@mit.edu,
adilger.kernel@dilger.ca, jack@suse.cz, yukuai3@huawei.com,
yebin10@huawei.com
Subject: Re: [RFC PATCH v3] ext4: convert symlink external data block mapping to bdev
Date: Wed, 20 Apr 2022 14:32:07 +0200 [thread overview]
Message-ID: <20220420123207.ndw3xw7oabp6bbpn@quack3.lan> (raw)
In-Reply-To: <20220418063735.2067766-1-yi.zhang@huawei.com>
On Mon 18-04-22 14:37:35, Zhang Yi wrote:
> Symlink's external data block is one kind of metadata block, and now
> that almost all ext4 metadata block's page cache (e.g. directory blocks,
> quota blocks...) belongs to bdev backing inode except the symlink. It
> is essentially worked in data=journal mode like other regular file's
> data block because probably in order to make it simple for generic VFS
> code handling symlinks or some other historical reasons, but the logic
> of creating external data block in ext4_symlink() is complicated. and it
> also make things confused if user do not want to let the filesystem
> worked in data=journal mode. This patch convert the final exceptional
> case and make things clean, move the mapping of the symlink's external
> data block to bdev like any other metadata block does.
>
> Signed-off-by: Zhang Yi <yi.zhang@huawei.com>
The patch looks good now except for one problem:
> +static const char *ext4_get_link(struct dentry *dentry, struct inode *inode,
> + struct delayed_call *callback)
> +{
> + struct buffer_head *bh;
> +
> + if (!dentry) {
> + bh = ext4_getblk(NULL, inode, 0, 0);
This is problematic because in RCU walk mode we must not sleep and
ext4_getblk() may sleep in ext4_map_blocks(). So we'd need some trick to
avoid that.
Honza
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
next prev parent reply other threads:[~2022-04-20 12:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-18 6:37 [RFC PATCH v3] ext4: convert symlink external data block mapping to bdev Zhang Yi
2022-04-20 12:32 ` Jan Kara [this message]
2022-04-21 14:59 ` [ext4] bfe57bd7e1: BUG:sleeping_function_called_from_invalid_context_at_fs/buffer.c kernel test robot
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=20220420123207.ndw3xw7oabp6bbpn@quack3.lan \
--to=jack@suse.cz \
--cc=adilger.kernel@dilger.ca \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
--cc=yebin10@huawei.com \
--cc=yi.zhang@huawei.com \
--cc=yukuai3@huawei.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