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 4DA8CC001DE for ; Wed, 26 Jul 2023 13:22:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233883AbjGZNWN (ORCPT ); Wed, 26 Jul 2023 09:22:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41676 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233885AbjGZNWL (ORCPT ); Wed, 26 Jul 2023 09:22:11 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 494BA1FEC; Wed, 26 Jul 2023 06:22:10 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id DC196613CA; Wed, 26 Jul 2023 13:22:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6D1C7C433CB; Wed, 26 Jul 2023 13:22:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1690377729; bh=KWTeyV7DSPb2JSt6yu397zgUB2KJ1PVPqwI+zIQkUUU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Hub6FWYEiLv7RETY8FZB+4ovR289Ky7YEJFew1gNoTwUJx5d0fvY/MaUcswq9cN55 eOLKkWA7zCbBr4qm18cto0btKTqHrXlOv4VtOZKpRWyitSLHwJeFLmkbUbGbvGXcmX U2Lyci2qJsVnB9FYCPuJVvOHqelPiQ0OxTyM6IrQ2JiPIXdyA8glXCvFIEZiJI8hqd z6Kkvn5IzqN7TCGoUmQUe/xfTS1ErAE1cy+njytugbaqPp+v1XOCiUUQjAZ1IQPs1i F1MpOw056Uu94n9EOORfYx7WjPG/7iVX5nk9rT83vbpQ3BzEjsIxwOy6TRKvO2CN8J 3f+2mcb31nQVg== Date: Wed, 26 Jul 2023 15:22:03 +0200 From: Christian Brauner To: Hao Xu Cc: io-uring@vger.kernel.org, Jens Axboe , Dominique Martinet , Pavel Begunkov , Alexander Viro , Stefan Roesch , Clay Harris , Dave Chinner , "Darrick J . Wong" , linux-fsdevel@vger.kernel.org, linux-xfs@vger.kernel.org, linux-ext4@vger.kernel.org, Wanpeng Li Subject: Re: [RFC 0/7] io_uring lseek Message-ID: <20230726-reinreden-packten-e7ab9aff296a@brauner> References: <20230726102603.155522-1-hao.xu@linux.dev> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20230726102603.155522-1-hao.xu@linux.dev> Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org On Wed, Jul 26, 2023 at 06:25:56PM +0800, Hao Xu wrote: > From: Hao Xu > > This series adds lseek for io_uring, the motivation to import this > syscall is in previous io_uring getdents patchset, we lack a way to > rewind the file cursor when it goes to the end of file. Another reason > is lseek is a common syscall, it's good for coding consistency when > users use io_uring as their main loop. While I understand this it is a time consuming review to make sure things work correctly. So before we get this thing going we better get getdents correct first. > > Patch 1 is code clean for iomap > Patch 2 adds IOMAP_NOWAIT logic for iomap lseek > Patch 3 adds a nowait parameter to for IOMAP_NOWAIT control > Patch 4 adds llseek_nowait() for file_operations so that specific > filesystem can implement it for nowait lseek > Patch 5 adds llseek_nowait() implementation for xfs > Patch 6 adds a new vfs wrapper for io_uring use > Patch 7 is the main io_uring lseek implementation > > Note, this series depends on the previous io_uring getdents series. > > This is marked RFC since there is (at least) an issue to be discussed: > The work in this series is mainly to reslove a problem that the current > llseek() in struct file_operations doesn't have a place to deliver > nowait info, and adding an argument to it results in update for llseek > implementation of all filesystems (35 functions), so here I introduce > a new llseek_nowait() as a workaround. My intuition would be to update all filesystems. Adding new inode operations always starts as a temporary thing and then we live with two different methods for the next years or possibly forever. But it'd be good to hear what others think.