Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp547251pxb; Thu, 21 Apr 2022 05:31:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxFBuVnWbryNiky4lDkuKan0dZOoYhFSxcYdcwJse0CqPRbT3XRhlVckAG+dkm2SKpD/FNh X-Received: by 2002:a05:6a02:106:b0:36c:96dd:8c17 with SMTP id bg6-20020a056a02010600b0036c96dd8c17mr24248663pgb.190.1650544259886; Thu, 21 Apr 2022 05:30:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650544259; cv=none; d=google.com; s=arc-20160816; b=i8tPMmzk5NG5A9LbK1uncq3YS1aDK50eRoAGaZ16WyHyY85prBAQ/7eZzdxlDbYLjl 07LQleS+BuJ66eLBEWAgiqBWyWCpvVSb88QfxQmEDInsO+xFqQTsyQx0yJzbORBchZqq oCbNDvgkVhif2TmKD1aC6soYXC9CMCpNqXU+2R/M/9yhEwTsOMkXTz8lvI29AAu5K1gp lw3Ep9L/2npTXkYxAT6yKHg7c6L/BF8b8l/rHij9FFieBJjBfkiKtzdmYtwDY8rrJAGx jGYpJQfMu5GdSTNrsgi6kGKvSGewPa/dYy/COh9ibM1fkhWMgQ+RXWLM2kuY2sxT+XBn eyqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=xP5H7NjBGW+y/TT7StVgwoavMLjW4bZ1WDSDVdf51U4=; b=hSISNTu/A7BhiA67+ll/OFbDhroaV3itl3PKeDMINTUQx3NuJVbIqKm3yiZFj82mM7 kXhG02bRLyar4ynJsLvCA+zhPgMKLATui6t8Sv1uoe7lgXh7fIOn0qUb3Q+WZxcPfhaS 6w/hc3so8i7HSbSAZYPT6oKh8YOFlhnNN3CPH0xUyXcEsn+vusYMsniQFRDegyTKoaci cjpd4Q4NXU/X0DloZQc8VJa/R2jDn5hME0waw3zh9u0Rx1/S6qitO1HtJ7GEaSVQRlnA dUBj5+ZNm+nq6Kgb5Wt8EsoFTJ5+7B8mzWQRHeUjz0Ax0TqyXzHW5FWLgqTOndNJazAR LUOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=rGqnkimi; dkim=neutral (no key) header.i=@suse.cz header.b=I8AhdOun; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p17-20020a170902e75100b001568acea039si5219691plf.554.2022.04.21.05.30.46; Thu, 21 Apr 2022 05:30:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=rGqnkimi; dkim=neutral (no key) header.i=@suse.cz header.b=I8AhdOun; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1353338AbiDTMe5 (ORCPT + 99 others); Wed, 20 Apr 2022 08:34:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47508 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354415AbiDTMe5 (ORCPT ); Wed, 20 Apr 2022 08:34:57 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 24A473FDA1 for ; Wed, 20 Apr 2022 05:32:11 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id D5E8521118; Wed, 20 Apr 2022 12:32:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1650457929; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=xP5H7NjBGW+y/TT7StVgwoavMLjW4bZ1WDSDVdf51U4=; b=rGqnkimiopUbheSYY8IFMY8gDedoBXOQvRnX9vdBoFhNjlR4CXvKhJZPPasKzFFBhseBS2 NbaPbmWHPHi892Sw/IEN9y3cSzjpLQS40IeGhGpxcoVJbh9OqxGySVtEV1gPfOKRSpCM5H TCHzN7pVeEklArUX/flQ9Hy7QiFXfWs= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1650457929; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=xP5H7NjBGW+y/TT7StVgwoavMLjW4bZ1WDSDVdf51U4=; b=I8AhdOunNZ0pa/sRojkleUAlLkPmcCNxV+5oNpRvO5J2gdSNpAwm3zJtE27jhDLsJi8QAG UBgBsMoDso0jGkBA== Received: from quack3.suse.cz (unknown [10.100.224.230]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id B632C2C14F; Wed, 20 Apr 2022 12:32:09 +0000 (UTC) Received: by quack3.suse.cz (Postfix, from userid 1000) id EC046A061E; Wed, 20 Apr 2022 14:32:07 +0200 (CEST) Date: Wed, 20 Apr 2022 14:32:07 +0200 From: Jan Kara To: Zhang Yi 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 Message-ID: <20220420123207.ndw3xw7oabp6bbpn@quack3.lan> References: <20220418063735.2067766-1-yi.zhang@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220418063735.2067766-1-yi.zhang@huawei.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org 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 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 SUSE Labs, CR