Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp2637642lqz; Wed, 3 Apr 2024 04:26:23 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXi1zaIJr2W+PcsIN5cg3m8R2n9DFkmQXffaeM4zmOf0g7gQEW303pWyk7N/eTXnrOsOe4QtLUqYETw8MobaEFD9JZGYGPvUNEua/3cNQ== X-Google-Smtp-Source: AGHT+IFMc/J242dQ6WQDauqNfcbZCUaEPLFJg5Mqndza4Xl6Ewnt/K6YgyMaSwi7xhzMl4b8pZ/r X-Received: by 2002:a0c:cd8d:0:b0:699:125:8547 with SMTP id v13-20020a0ccd8d000000b0069901258547mr9832063qvm.63.1712143582884; Wed, 03 Apr 2024 04:26:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712143582; cv=pass; d=google.com; s=arc-20160816; b=teitCNenovHqsp3Fv1nIo9Lxv3UE6P5TmtBETCCW9ew/WE/ujqaR0U+O9YF+6UQfBG NC0LBaDGte2WjhjAp0mxIuhSqlU5ocd8lbwiUmZB8wEUeU+1r2llLsC3T0LBqsa/7q8q WYClK27olsFVUjqFOTyYDNxuaNa051Sq41UouL2iTphB3zpDeptwqVXJFNW4oFaSlOk8 VSRhq++/uO2hGp6GPz3szyxNa464On46HuRi0QD5ypHDHTeVGw3WBHtYLdF/XnvsxfSs FfLm0JkBlB2uvuYYNYLEVU65HuNPn6tzWUhnBx22cM0af1q0RyuRNkNlcth37LzPzhg/ IzXg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature:dkim-signature; bh=54XuIdUwF3kNBca8B3d+4aw8AC5z3K/ax7Sw1nc33og=; fh=wwpCVZXFYCIS7FLb6N3nY16EE84ED201EvVRk6LcKII=; b=lWEF6kzNU0aVNfDiV79ah37RFD7KK/RJM0KR+ur/lCpDW9ZahO3uRAEKTpFu5NqMz9 gjmyevk61YA0VBBQdWUPQ1JvfPjWpn6nfg5d9qGM4LbTrcQVUmAh/AAoKkZ38281ng8g QCygu6Z98p0W6F5QFN/afQNzy6I93MgqUu2RYCZbYszR+oKRqHVwX/myBYhjvzzfQN8s LpwnGmUUF17r4x5NvMV8WNm7R7zd9Il/4WMx500oXJ+QYnYUvrFKqfwt3zD7qJvaaBCz lV5KMfODHQ7QPIu7o+Kkx+RG48B23S7crFScbamMMCiCHFRht5p56riJgdNRdsMM35Sv uMwg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=V6ezk5Mn; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; arc=pass (i=1 spf=pass spfdomain=suse.cz dkim=pass dkdomain=suse.cz); spf=pass (google.com: domain of linux-kernel+bounces-129661-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-129661-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id c5-20020a0cd605000000b0069794fc1ba6si13937822qvj.123.2024.04.03.04.26.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Apr 2024 04:26:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-129661-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=V6ezk5Mn; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519; arc=pass (i=1 spf=pass spfdomain=suse.cz dkim=pass dkdomain=suse.cz); spf=pass (google.com: domain of linux-kernel+bounces-129661-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-129661-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 93FBD1C25DDC for ; Wed, 3 Apr 2024 11:26:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9587114386F; Wed, 3 Apr 2024 11:26:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b="V6ezk5Mn"; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b="oHe68Sjy" Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 93782135A5F; Wed, 3 Apr 2024 11:26:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712143568; cv=none; b=W80qhDDO76VDR+N60i53ATVqyo2W4UeBto4H90QochrkoCSAcDgVZ7ZioRkntTUvHE2cRQmMmp6vUxYPK+VD5RPxOTPEyldzTROq3gMtPAFVjppqKjWXG4yDJ+I/xh7i2nHXdK3iK0uuY1REMGSKV/oaZVh2YE+AYIMIdAH8fEk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712143568; c=relaxed/simple; bh=B1D7E4BM5v4MwQPNkDEDRTd/yHE8sU0PvvLfbGkYHFA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=QCPWCRvblYLrkO55KEVq2Ojgpdw/yLJWwtpZy8ki2WMBwZWY/qAuwb4yAccJdTgPaM4ahMp+ZOIz9E5vVeVGpB1Mucefa2Doibeea/sYE+XsRZeYkcAr2ZhGL+e68ixIklLATEevoS+FuRSxWT/We2Q/56QFm5jRSJMz3yyugUg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz; spf=pass smtp.mailfrom=suse.cz; dkim=pass (1024-bit key) header.d=suse.cz header.i=@suse.cz header.b=V6ezk5Mn; dkim=permerror (0-bit key) header.d=suse.cz header.i=@suse.cz header.b=oHe68Sjy; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.cz Received: from imap2.dmz-prg2.suse.org (imap2.dmz-prg2.suse.org [10.150.64.98]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id CBCBE35299; Wed, 3 Apr 2024 11:26:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1712143563; 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=54XuIdUwF3kNBca8B3d+4aw8AC5z3K/ax7Sw1nc33og=; b=V6ezk5MnIOqz3bzeAZk3jMav5NApJuUwfgsrdqb/bT5QyNgBI4m8t7INejzbjsNHs3YsLQ 8Qh8+VrfFymHsI+c1Aj+fI2zL5ma1coKb03PCGQeABW2vQjs623sx+Zgj+joEAiHbGdMMO CRZiMBcYYNwKLhjdBZPhSlksKWWTe7A= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1712143563; 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=54XuIdUwF3kNBca8B3d+4aw8AC5z3K/ax7Sw1nc33og=; b=oHe68SjyGtvEBCK+yhyWBnBmmLpoNa+Xyp4nigoxHletQHBaiGGyitBS8+Jv8W8+DuhYpP xPMLUCz5BgUl6uCg== Authentication-Results: smtp-out1.suse.de; none Received: from imap2.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap2.dmz-prg2.suse.org (Postfix) with ESMTPS id C04C81331E; Wed, 3 Apr 2024 11:26:03 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap2.dmz-prg2.suse.org with ESMTPSA id lIruLss8DWYiIgAAn2gu4w (envelope-from ); Wed, 03 Apr 2024 11:26:03 +0000 Received: by quack3.suse.cz (Postfix, from userid 1000) id 81366A0814; Wed, 3 Apr 2024 13:25:55 +0200 (CEST) Date: Wed, 3 Apr 2024 13:25:55 +0200 From: Jan Kara To: Sweet Tea Dorminy Cc: Jonathan Corbet , Kent Overstreet , Brian Foster , Chris Mason , Josef Bacik , David Sterba , Jaegeuk Kim , Chao Yu , Alexander Viro , Christian Brauner , Jan Kara , =?utf-8?Q?Micka=C3=ABl_Sala=C3=BCn?= , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-bcachefs@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-fsdevel@vger.kernel.org, kernel-team@meta.com Subject: Re: [PATCH v3 10/13] ocfs2: fiemap: return correct extent physical length Message-ID: <20240403112555.nj2l5jw2xjrsud3y@quack3> References: <0b492e10a9034c8fb08ca654c06471575e8bb96d.1712126039.git.sweettea-kernel@dorminy.me> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0b492e10a9034c8fb08ca654c06471575e8bb96d.1712126039.git.sweettea-kernel@dorminy.me> X-Spam-Score: -3.71 X-Spamd-Result: default: False [-3.71 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.cz:s=susede2_rsa,suse.cz:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-0.999]; RCPT_COUNT_TWELVE(0.00)[20]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.com:email]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; MID_RHS_NOT_FQDN(0.50)[]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-2.91)[99.60%] X-Spam-Level: X-Spam-Flag: NO On Wed 03-04-24 03:22:51, Sweet Tea Dorminy wrote: > Signed-off-by: Sweet Tea Dorminy > --- > fs/ocfs2/extent_map.c | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/fs/ocfs2/extent_map.c b/fs/ocfs2/extent_map.c > index eabdf97cd685..229ea45df37b 100644 > --- a/fs/ocfs2/extent_map.c > +++ b/fs/ocfs2/extent_map.c > @@ -705,7 +705,9 @@ static int ocfs2_fiemap_inline(struct inode *inode, struct buffer_head *di_bh, > unsigned int id_count; > struct ocfs2_dinode *di; > u64 phys; > - u32 flags = FIEMAP_EXTENT_DATA_INLINE|FIEMAP_EXTENT_LAST; > + u32 flags = (FIEMAP_EXTENT_DATA_INLINE| > + FIEMAP_EXTENT_HAS_PHYS_LEN| > + FIEMAP_EXTENT_LAST); > struct ocfs2_inode_info *oi = OCFS2_I(inode); > > di = (struct ocfs2_dinode *)di_bh->b_data; > @@ -782,7 +784,7 @@ int ocfs2_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, > continue; > } > > - fe_flags = 0; > + fe_flags = FIEMAP_EXTENT_HAS_PHYS_LEN; > if (rec.e_flags & OCFS2_EXT_UNWRITTEN) > fe_flags |= FIEMAP_EXTENT_UNWRITTEN; > if (rec.e_flags & OCFS2_EXT_REFCOUNTED) Again, we should be passing non-zero phys_len if we set FIEMAP_EXTENT_HAS_PHYS_LEN flag AFAIU. Honza -- Jan Kara SUSE Labs, CR