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 ED9B5C7EE2D for ; Tue, 23 May 2023 16:03:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237702AbjEWQDW (ORCPT ); Tue, 23 May 2023 12:03:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58764 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236586AbjEWQDU (ORCPT ); Tue, 23 May 2023 12:03:20 -0400 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9E88712B; Tue, 23 May 2023 09:03:10 -0700 (PDT) Received: by verein.lst.de (Postfix, from userid 2407) id D315C6732D; Tue, 23 May 2023 18:03:07 +0200 (CEST) Date: Tue, 23 May 2023 18:03:07 +0200 From: Christoph Hellwig To: Miklos Szeredi Cc: Christoph Hellwig , Matthew Wilcox , Jens Axboe , Xiubo Li , Ilya Dryomov , Alexander Viro , Christian Brauner , Theodore Ts'o , Jaegeuk Kim , Chao Yu , Andreas Gruenbacher , "Darrick J. Wong" , Trond Myklebust , Anna Schumaker , Damien Le Moal , Andrew Morton , linux-block@vger.kernel.org, ceph-devel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, "open list:F2FS FILE SYSTEM" , cluster-devel@redhat.com, linux-xfs@vger.kernel.org, linux-nfs@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH 10/13] fs: factor out a direct_write_fallback helper Message-ID: <20230523160307.GD15391@lst.de> References: <20230519093521.133226-1-hch@lst.de> <20230519093521.133226-11-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Mon, May 22, 2023 at 04:19:38PM +0200, Miklos Szeredi wrote: > > + ssize_t direct_written, ssize_t buffered_written) > > +{ > > + struct address_space *mapping = iocb->ki_filp->f_mapping; > > + loff_t pos = iocb->ki_pos, end; > > At this point pos will point after the end of the buffered write (as > per earlier patches), yes? Yes. I'll fix the pos and end calculation.