Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp1201059rdb; Fri, 19 Jan 2024 11:10:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IG7w2RAR+JxWIg/RtEdgRdqZKZMHVmmdgiSZ8Mmx797xpYcadJB6U731Q3V1NM+APzwVdNe X-Received: by 2002:a17:902:a710:b0:1d7:14e0:d46c with SMTP id w16-20020a170902a71000b001d714e0d46cmr1472378plq.67.1705691456028; Fri, 19 Jan 2024 11:10:56 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705691456; cv=pass; d=google.com; s=arc-20160816; b=Np/+73m3Lr4Ctg/hJO3nRA+HW1PV5jbOqa/yzjUtwQMxMQLceHDNxESoHRznE85pFE +5pukNkgEuDsb8cetAmt76SP85HHIw32F72xxbhYHjBH5bEkz2asHUE6o91KZkobf12N v70Cqcs7sMnnmnXIqamyw3mciUga+ABmoQ0idE5yHUa+rgo33s1SQ2jD7RNVoi+GAm+r DPzNS3/yvGJCTZdS2ESnhGt2sOhMO09UVt2EXX1zKuebTo7EiIZatPalx55dMmld7bF1 AmnxfN7MaedgIn6GYjicqaxfmC0vLgxER1sOuWYnqTkd3vmFQqt92z7XiU8oghiKN+kJ Ekqw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date; bh=8B/LJfMPtD+MCWAaFpbOMQh6E9ogObkEXo6Jv9iTAEk=; fh=dT/QhV/j7FXRxh1pRanuYgfy1xeLHw6w44rDSHHcJqs=; b=VQIM0ILVBYND6ih6+qN1+9Kryt4Yr5/+2fSj+kwygXvlD88bG2wJNhjvx9t9vcycHU cwcmik/9nAIUwya7D36zc6GMlXleZIiW429BTLTQ5NLVJuy+uK8MaZruWe7HUUCh+OpD IMfRSV1aLGtYe1DElp37Vhsb9Vv/Rl//ffxk9dARK7zPurCbEXDHKghNCvfZ5le/Lojl 9DbXOGUufxRXzKncgR96AnO31HCj/8eA+gGHjfhVm2K3v/bmsd5loxqFlt7Nt8hxUEMa /7gErWszD2P8TGtMWPkXVzoS0LUFHd4o9HI5peZigAbx0mGDTvwotNbH68SQ2Q7bJ0rE bScQ== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=libc.org); spf=pass (google.com: domain of linux-kernel+bounces-31509-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31509-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id r64-20020a632b43000000b005c65d0dd9a0si3790733pgr.503.2024.01.19.11.10.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Jan 2024 11:10:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-31509-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=libc.org); spf=pass (google.com: domain of linux-kernel+bounces-31509-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-31509-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id AAD7E283F51 for ; Fri, 19 Jan 2024 19:10:55 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A1E9D56456; Fri, 19 Jan 2024 19:10:49 +0000 (UTC) Received: from brightrain.aerifal.cx (brightrain.aerifal.cx [104.156.224.86]) (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 0CEA91DDC5 for ; Fri, 19 Jan 2024 19:10:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=104.156.224.86 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705691449; cv=none; b=GRHn5QTTJBTQd9jy+rGCWvs0txVFqmGgDOhyD9oV8TmrH9r2gFTM6fKS520EqP2ILEstDrV4NErGSsc2jgNzfS50sVILoov9L2OFCu6rlMjJC/A8dYwbPN3JkxgkbSHSMtB8m5zCiIzmYDiiB+q+Ok6+eKuZ8k1AA3Y0ACik7RI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705691449; c=relaxed/simple; bh=8PECGMhwm3BopdpqET6OaIAick528GtTNtZM1lUUtkQ=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=LN27PohP6SpJZkm9MgEJ23ZBxN+cN0jOBbZcQ96qYronyF0G1iNpU0iNZOWhhU9aXDyp3R2ExaIei8huuTlt2njE2lsorNOX81c2+S0dHrga+kf29RqEQjqn2w2LiQns+CmnLhG12OeR9YAVTeXHjRF0Y5y+1HMVcLCB+V5BRtQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=libc.org; spf=pass smtp.mailfrom=libc.org; arc=none smtp.client-ip=104.156.224.86 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=libc.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=libc.org Date: Fri, 19 Jan 2024 14:10:54 -0500 From: Rich Felker To: Christian Brauner Cc: Jens Axboe , linux-fsdevel , kernel list , Linux API , Alexander Viro , Pavel Begunkov , Jann Horn Subject: Re: [PATCH v2] vfs: add RWF_NOAPPEND flag for pwritev2 Message-ID: <20240119191053.GT22081@brightrain.aerifal.cx> References: <20200831153207.GO3265@brightrain.aerifal.cx> <20240119-neuverfilmung-aufregend-54a5bd5929dd@brauner> 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: <20240119-neuverfilmung-aufregend-54a5bd5929dd@brauner> User-Agent: Mutt/1.5.21 (2010-09-15) On Fri, Jan 19, 2024 at 03:33:32PM +0100, Christian Brauner wrote: > On Mon, 31 Aug 2020 11:32:08 -0400, Rich Felker wrote: > > The pwrite function, originally defined by POSIX (thus the "p"), is > > defined to ignore O_APPEND and write at the offset passed as its > > argument. However, historically Linux honored O_APPEND if set and > > ignored the offset. This cannot be changed due to stability policy, > > but is documented in the man page as a bug. > > > > Now that there's a pwritev2 syscall providing a superset of the pwrite > > functionality that has a flags argument, the conforming behavior can > > be offered to userspace via a new flag. Since pwritev2 checks flag > > validity (in kiocb_set_rw_flags) and reports unknown ones with > > EOPNOTSUPP, callers will not get wrong behavior on old kernels that > > don't support the new flag; the error is reported and the caller can > > decide how to handle it. > > > > [...] > > The RWF_* and IOCB_* flags were > aligned so they could be set in one operation. So there was a merge > conflict when applying. I've resolved it. Please take a look and make > sure that it's all correct. > > --- > > Applied to the vfs.misc branch of the vfs/vfs.git tree. > Patches in the vfs.misc branch should appear in linux-next soon. > > Please report any outstanding bugs that were missed during review in a > new review to the original patch series allowing us to drop it. > > It's encouraged to provide Acked-bys and Reviewed-bys even though the > patch has now been applied. If possible patch trailers will be updated. > > Note that commit hashes shown below are subject to change due to rebase, > trailer updates or similar. If in doubt, please check the listed branch. > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git > branch: vfs.misc > > [1/1] vfs: add RWF_NOAPPEND flag for pwritev2 > https://git.kernel.org/vfs/vfs/c/31081ab305a1 LGTM. Thanks!