From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3C663C43334 for ; Fri, 22 Jul 2022 16:24:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233186AbiGVQYm (ORCPT ); Fri, 22 Jul 2022 12:24:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229593AbiGVQYm (ORCPT ); Fri, 22 Jul 2022 12:24:42 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A1F58AB31; Fri, 22 Jul 2022 09:24:41 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 245A2621BD; Fri, 22 Jul 2022 16:24:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 801EFC341C6; Fri, 22 Jul 2022 16:24:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1658507080; bh=ERD6L0tGWO0x9Vzt+94y6IPYs2il1yz7+hLCIIQ9VMQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=M7syBNh7Q+slzlSg95Ty+U3caUx3OkvdZKYgFaT6zO7YKN9OsdTxAXKpzM/fQ8EUj 8laTCMg9BidYfI43AVNQjAskrSgTEIhdawoWcCWFN1EAKRyOqivbfv7qK9N59+Vvnq ixHzlI/3Lkn2UIyRqLOaAICt3NyJKQeAO9La4LBsM3B/cUM9f6Cxa2XXZSNWSWP4n7 eKglhO2cux23pKTuvR31k1jROOcx4Jvj6L34W3fwmJ0EjPxsmlZpViqsKNhWnWhV8U qZwtGZ8Kg87h7OJAYIWHEdlyKK+giZJRMb/S/JIukT8Eyn8v4Et7jPN0R8WTIdRmRv SETEtPcVhPZPQ== Date: Fri, 22 Jul 2022 09:24:39 -0700 From: "Darrick J. Wong" To: Eric Biggers Cc: linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-xfs@vger.kernel.org, linux-api@vger.kernel.org, linux-fscrypt@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, Keith Busch Subject: Re: [PATCH v4 9/9] xfs: support STATX_DIOALIGN Message-ID: References: <20220722071228.146690-1-ebiggers@kernel.org> <20220722071228.146690-10-ebiggers@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220722071228.146690-10-ebiggers@kernel.org> Precedence: bulk List-ID: X-Mailing-List: linux-fscrypt@vger.kernel.org On Fri, Jul 22, 2022 at 12:12:28AM -0700, Eric Biggers wrote: > From: Eric Biggers > > Add support for STATX_DIOALIGN to xfs, so that direct I/O alignment > restrictions are exposed to userspace in a generic way. > > Signed-off-by: Eric Biggers LGTM Reviewed-by: Darrick J. Wong --D > --- > fs/xfs/xfs_iops.c | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c > index 29f5b8b8aca69a..bac3f56141801e 100644 > --- a/fs/xfs/xfs_iops.c > +++ b/fs/xfs/xfs_iops.c > @@ -605,6 +605,15 @@ xfs_vn_getattr( > stat->blksize = BLKDEV_IOSIZE; > stat->rdev = inode->i_rdev; > break; > + case S_IFREG: > + if (request_mask & STATX_DIOALIGN) { > + struct xfs_buftarg *target = xfs_inode_buftarg(ip); > + > + stat->result_mask |= STATX_DIOALIGN; > + stat->dio_mem_align = target->bt_logical_sectorsize; > + stat->dio_offset_align = target->bt_logical_sectorsize; > + } > + fallthrough; > default: > stat->blksize = xfs_stat_blksize(ip); > stat->rdev = 0; > -- > 2.37.0 > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DA8E0C43334 for ; Fri, 22 Jul 2022 16:24:55 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-2.v29.lw.sourceforge.com) by sfs-ml-2.v29.lw.sourceforge.com with esmtp (Exim 4.94.2) (envelope-from ) id 1oEvSN-0000jC-9N; Fri, 22 Jul 2022 16:24:52 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-2.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1oEvSM-0000j6-TJ for linux-f2fs-devel@lists.sourceforge.net; Fri, 22 Jul 2022 16:24:51 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=In-Reply-To:Content-Type:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=sYdK5Po1dlw7EwssP5lS20P2VrCndDaBOTyFsmk21f4=; b=glIFw40OkDNetH+oUgc7vOSPqy GIQxsKQwpIVrqsCgx0g/FMbVLaeInBGMoJuffEZhDWx2q7PGjQxUpqBFhOXxHcpA+uwYZa+6x8FdL g1lWirSOKM+mdkPqydiHFBlGz8lJB4MpiQqzIJfSQ9mIex85tZkqdml6F5fR563+tSzU=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To :From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=sYdK5Po1dlw7EwssP5lS20P2VrCndDaBOTyFsmk21f4=; b=R+GnGPrL8NhrLb2USKqk5idP9K +HUnCdTnTYMaQufVaUZ/HWzc2eWYJ+hk5D9KcAWfyJAmsqufbkZxwWNxHAAkPY53bnG77IpolL1Zt QDyf6EQrjh+QWixm/YMoykrPd7wqnXPcDC449yz1n9n97h8MeH+lEaRZFjWgAtKIhDPQ=; Received: from dfw.source.kernel.org ([139.178.84.217]) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.94.2) id 1oEvSJ-0001B6-BM for linux-f2fs-devel@lists.sourceforge.net; Fri, 22 Jul 2022 16:24:51 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 2AD8D621E0 for ; Fri, 22 Jul 2022 16:24:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 801EFC341C6; Fri, 22 Jul 2022 16:24:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1658507080; bh=ERD6L0tGWO0x9Vzt+94y6IPYs2il1yz7+hLCIIQ9VMQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=M7syBNh7Q+slzlSg95Ty+U3caUx3OkvdZKYgFaT6zO7YKN9OsdTxAXKpzM/fQ8EUj 8laTCMg9BidYfI43AVNQjAskrSgTEIhdawoWcCWFN1EAKRyOqivbfv7qK9N59+Vvnq ixHzlI/3Lkn2UIyRqLOaAICt3NyJKQeAO9La4LBsM3B/cUM9f6Cxa2XXZSNWSWP4n7 eKglhO2cux23pKTuvR31k1jROOcx4Jvj6L34W3fwmJ0EjPxsmlZpViqsKNhWnWhV8U qZwtGZ8Kg87h7OJAYIWHEdlyKK+giZJRMb/S/JIukT8Eyn8v4Et7jPN0R8WTIdRmRv SETEtPcVhPZPQ== Date: Fri, 22 Jul 2022 09:24:39 -0700 From: "Darrick J. Wong" To: Eric Biggers Message-ID: References: <20220722071228.146690-1-ebiggers@kernel.org> <20220722071228.146690-10-ebiggers@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220722071228.146690-10-ebiggers@kernel.org> X-Headers-End: 1oEvSJ-0001B6-BM Subject: Re: [f2fs-dev] [PATCH v4 9/9] xfs: support STATX_DIOALIGN X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-block@vger.kernel.org, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-xfs@vger.kernel.org, Keith Busch , linux-fscrypt@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net On Fri, Jul 22, 2022 at 12:12:28AM -0700, Eric Biggers wrote: > From: Eric Biggers > > Add support for STATX_DIOALIGN to xfs, so that direct I/O alignment > restrictions are exposed to userspace in a generic way. > > Signed-off-by: Eric Biggers LGTM Reviewed-by: Darrick J. Wong --D > --- > fs/xfs/xfs_iops.c | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c > index 29f5b8b8aca69a..bac3f56141801e 100644 > --- a/fs/xfs/xfs_iops.c > +++ b/fs/xfs/xfs_iops.c > @@ -605,6 +605,15 @@ xfs_vn_getattr( > stat->blksize = BLKDEV_IOSIZE; > stat->rdev = inode->i_rdev; > break; > + case S_IFREG: > + if (request_mask & STATX_DIOALIGN) { > + struct xfs_buftarg *target = xfs_inode_buftarg(ip); > + > + stat->result_mask |= STATX_DIOALIGN; > + stat->dio_mem_align = target->bt_logical_sectorsize; > + stat->dio_offset_align = target->bt_logical_sectorsize; > + } > + fallthrough; > default: > stat->blksize = xfs_stat_blksize(ip); > stat->rdev = 0; > -- > 2.37.0 > _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel