From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by mail19.linbit.com (LINBIT Mail Daemon) with ESMTP id F132442066E for ; Tue, 29 Nov 2022 18:51:02 +0100 (CET) Message-ID: From: Jeff Layton To: Christoph Hellwig , Benjamin Coddington Date: Tue, 29 Nov 2022 12:42:33 -0500 In-Reply-To: <20221129140242.GA15747@lst.de> References: <20221129140242.GA15747@lst.de> Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: Latchesar Ionkov , Dominique Martinet , Valentina Manea , linux-nvme@lists.infradead.org, Philipp Reisner , David Howells , Joseph Qi , Eric Dumazet , linux-nfs@vger.kernel.org, Marc Dionne , Shuah Khan , linux-afs@lists.infradead.org, Mike Christie , drbd-dev@lists.linbit.com, linux-cifs@vger.kernel.org, Sagi Grimberg , linux-scsi@vger.kernel.org, Mark Fasheh , cluster-devel@redhat.com, Christine Caulfield , Jakub Kicinski , Ilya Dryomov , Paolo Abeni , Keith, Anna Schumaker , Hensbergen , "James E.J. Bottomley" , Josef Bacik , David, linux-block@vger.kernel.org, nbd@other.debian.org, Greg, Teigland , Joel Becker , Chuck, v9fs-developer@lists.sourceforge.net, Busch , ceph-devel@vger.kernel.org, Xiubo Li , Trond Myklebust , Jens Axboe , Chris Leech , open-iscsi@googlegroups.com, "Martin K. Petersen" , netdev@vger.kernel.org, linux-usb@vger.kernel.org, samba-technical@lists.samba.org, linux-kernel@vger.kernel.org, "David S. Miller" , Steve French , Lever , Lee Duncan , Kroah-Hartman , Lars Ellenberg , Eric, ocfs2-devel@oss.oracle.com Subject: Re: [Drbd-dev] [PATCH v1 2/3] Treewide: Stop corrupting socket's task_frag List-Id: "*Coordination* of development, patches, contributions -- *Questions* \(even to developers\) go to drbd-user, please." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Tue, 2022-11-29 at 15:02 +0100, Christoph Hellwig wrote: > Hmm. Having to set a flag to not accidentally corrupt per-task > state seems a bit fragile. Wouldn't it make sense to find a way to opt > into the feature only for sockets created from the syscall layer? I agree that that would be cleaner. task_frag should have been an opt-in thing all along. That change regressed all of the in-kernel users of sockets. Where would be the right place to set that flag for only userland sockets? A lot of the in-kernel socket users hook into the socket API at a fairly high-level. 9P and CIFS, for instance, call __sock_create. We could set it in the syscall handlers (and maybe in iouring) I suppose, but that seems like the wrong thing to do too. In the absence of a clean place to do this, I think we're going to be stuck doing it the way Ben has proposed... --=20 Jeff Layton