Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1940398imm; Thu, 12 Jul 2018 10:16:15 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdoiSeDU+l3xaevi76iWuB2+8oTSueBLFeKhx6pZ6IPWCAP7FE2AwlzY7gyPlH/mQLuuUZ3 X-Received: by 2002:a65:594b:: with SMTP id g11-v6mr2939323pgu.260.1531415775449; Thu, 12 Jul 2018 10:16:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531415775; cv=none; d=google.com; s=arc-20160816; b=MfjseASyOKhjIH29ckYIex6YyQA3+VfyhbJZb1CVHQuM1sarXix8mrvdA6oHq9p7Ig EIT73krjFV25xzuGq0vOwv11sZt7/5uRgS9QrY8kr9LmwJBWTUNXiCOsz5CtjLWC8vTW GZBd5hWgQ35cfJXJQw8PwqRh3lrVKCTnx8NSRQ/eJocYEwJeMs8K0K1gw5JwAttt6yU5 AiAB6RDER4K9g9cQoVDNqS+LIsTRi+hmp5uec0OPjXZzMlI3Pa0gl5yhpDRTDP9hjh6p fFbfnTrK5wzc5Yad21ThMRlTniZCon7HgNAZqE0UlDOGrTJuN1jZp/3B9+8bvmVHmbKq Py8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=75n14uXlMfFID40faZb/54QOEji1la+9qZWFPnZn89E=; b=VCOGIXMczGZ58/fcLT03NihfuUyaJxl8PiPUWFHULjOwEDpTbChNnKvNFnnA/TtnJk 3LTJ/AjGshNp8Bw5eYFXSUI3ve+Tco0Ajw1/h47c0msLbkxO0flYzQOvIz5pCTHadGC4 LsLpiXbr0hA1eXzpFFyMskNAepcBvXtZ/dEnVpp9MrMeQ1JLSAYozXVHrNZyogtGlVhT NyLZaJD5ja1cle8IUHUIlaZZedkXB3Pfwu5GOkwbmBDFPHKwb5lED3d03o1OjtYgXsh+ vY/uWDmAQuMVrmclux5bQDBmHQRtzxDA0Jv2r0Q+wS6O0fTTc2wRdNsCfxNrzc6LezNx wVMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=Y2P2jfCG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m3-v6si19855634plb.27.2018.07.12.10.16.00; Thu, 12 Jul 2018 10:16:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=Y2P2jfCG; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732557AbeGLRYp (ORCPT + 99 others); Thu, 12 Jul 2018 13:24:45 -0400 Received: from mail-it0-f65.google.com ([209.85.214.65]:37201 "EHLO mail-it0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727136AbeGLRYp (ORCPT ); Thu, 12 Jul 2018 13:24:45 -0400 Received: by mail-it0-f65.google.com with SMTP id p17-v6so7806177itc.2; Thu, 12 Jul 2018 10:14:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=75n14uXlMfFID40faZb/54QOEji1la+9qZWFPnZn89E=; b=Y2P2jfCGeGlwFXyCI6fpyqrg4g7/ylyS6kNRiAPGd24URD5lvdiw9P02atozasgj4/ CzpTqgg4o3Gd6I3FFoKS3diWrTlpZGGXCLSS5n6Qbe7bFS2DyZX5ndArgXHyEYq0WLTN Yh/9ViAFhnR81pI3DVZ0KnKFrfxl+pZPwxrvg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=75n14uXlMfFID40faZb/54QOEji1la+9qZWFPnZn89E=; b=bhIR2rKr2Qc9PtPdck3Hq4f8GAR/hCYR0vd80gaIUpRYES5fuvWGTn738fe9dgx64Q mTeW98qln9GgPmhAb+SoN4I1IuuZoqPQ0Uij+/DHwEEodXbDbrlog2lEFH7oZH9m0bjN cr25VBgYYqM6naEZplMIWPxsbyUdY+LMFOBE6I1Pp2X/bLf978LA0zJQRsqlt3Uz5vs8 VSBN+c8CSqw4laxdK+3B7PzwqUJmR7V/fER4ryMDH65v9CsKWr+t+WFKz0PTLcRZ5NwX A+vT+jfUPYLJNnyD6jqfYxWBEfTsRHp+++HvAI+mzDH0U2U01e0/cXv30E1IbRMjpk4o 0CCA== X-Gm-Message-State: AOUpUlFUz6rOeUTWonoeLBuG2L18S1q39afUtgI1J8wA64cQbHnl93ph kCLGulnDkei9HUohUcuEfJNj5RI0ZuObWCYv56k= X-Received: by 2002:a24:94f:: with SMTP id 76-v6mr2013172itm.113.1531415657142; Thu, 12 Jul 2018 10:14:17 -0700 (PDT) MIME-Version: 1.0 References: <153126248868.14533.9751473662727327569.stgit@warthog.procyon.org.uk> <153126264966.14533.3388004240803696769.stgit@warthog.procyon.org.uk> <686E805C-81F3-43D0-A096-50C644C57EE3@amacapital.net> <22370.1531293761@warthog.procyon.org.uk> <7002.1531407244@warthog.procyon.org.uk> <20180712160030.GV30522@ZenIV.linux.org.uk> <20180712163107.GW30522@ZenIV.linux.org.uk> In-Reply-To: From: Linus Torvalds Date: Thu, 12 Jul 2018 10:14:05 -0700 Message-ID: Subject: Re: [PATCH 24/32] vfs: syscall: Add fsopen() to prepare for superblock creation [ver #9] To: Al Viro Cc: David Howells , Andrew Lutomirski , Linux API , linux-fsdevel , Linux Kernel Mailing List , Jann Horn Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 12, 2018 at 9:39 AM Linus Torvalds wrote: > > I agree that a system call is likely saner. Especially since we'd have > one to _start_ this (ie "fsopen()") it would make sense to have the > one to finalize it. Side note: if we can make do with just a buffer, then we wouldn't need "fsopen()". You could literally just open a pipe, and write to it. It's got 16 pages worth of buffers by default, and you can increase it (within reason) as root. Of course, depending on IO patterns, not all the buffer pages are necessarily fully used, so it's not like you get a buffer of size PAGE_SIZE*16, but we do merge buffers so you should be fairly close. Then you really could do without a fsopen(). Just fill a pipe with data, and do "fsmount()" on the pipe contents. Added upside? You can use "iov_iter_pipe()" to iterate over all that data. I'm only half joking. Linus