Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp690961yba; Wed, 24 Apr 2019 08:06:12 -0700 (PDT) X-Google-Smtp-Source: APXvYqxuxHDBt5dJ6ss1PwtYh77BhYeFqCR6Chx5RVBDgDkluVp+DlKw+zLVrCWnOQlwL8JLKFxZ X-Received: by 2002:a63:500f:: with SMTP id e15mr31122174pgb.198.1556118372676; Wed, 24 Apr 2019 08:06:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556118372; cv=none; d=google.com; s=arc-20160816; b=XUWdod5e8PIBlf6OmDeWXzKvPm8oKtuxi5xptoHwmJVx7gBDzpd/kPoNfSJ+40GA54 TElUv2wF49uEenj5yAQpgKO7tODOGTkFCmP3gP8G8H57VJ92lfd2Tb6d/si4d9YlVhGD P+pGDQn19UbimrczgwrMgclDiiNVNsMNLRF8i2YQlCtmRwEhv0hH/RqQ66RekErYVv1u ioxHTtr6oQ7fiJrMuI81cNs7n+EZ6VygSctz5r/xx/KNgAOQwaUi+RkMp8naDxK78nEw gRy9qd2fmcbshETDX7WkkV27+ocsPbd7G/5rN1cUKwZexfx+fkvprHdQVryaitCM7P7t jkTQ== 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; bh=ZyvU6yfxfMmdoBsp+ARyAtBH3t7rGFLZFFfr9/y649E=; b=y4PUJXwbSO/e6xaSckVncNpXySaX2CIe5IzqP8EbQIR59Ka9KYPL06e1MDRapFhTVA q5nLPkauUY1FsktKIKtsOigOBJRCYpyFYJA7/K0yDb7f4QwZCu+10sOL+JoE25XF6uAf 0nT1SKhZg+WsseFJt6CdYsvfeJs0xsJP44JmyqY9gnn2kt0oH81eMrEPiLy8A7iRBli2 nCpq4TNS1rD0chCO9Bvs16nFv6nebP6hc3G4OCfkpOqB/yfkD/L8WKtlnLqK258MbP3C cN4eV1wMmwAGXSMzFlZzwX+htXtoKCfjYJ+viD9wD5/w4jnrwk4bAnRq/gt1mihviXCv Wh7w== ARC-Authentication-Results: i=1; mx.google.com; dkim=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=mSmraiUl; 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 s14si17728891pgs.343.2019.04.24.08.05.56; Wed, 24 Apr 2019 08:06:12 -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=temperror (no key for signature) header.i=@szeredi.hu header.s=google header.b=mSmraiUl; 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 S1730163AbfDXPCy (ORCPT + 99 others); Wed, 24 Apr 2019 11:02:54 -0400 Received: from mail-it1-f196.google.com ([209.85.166.196]:37644 "EHLO mail-it1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725941AbfDXPCx (ORCPT ); Wed, 24 Apr 2019 11:02:53 -0400 Received: by mail-it1-f196.google.com with SMTP id u65so6732508itc.2 for ; Wed, 24 Apr 2019 08:02:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=szeredi.hu; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ZyvU6yfxfMmdoBsp+ARyAtBH3t7rGFLZFFfr9/y649E=; b=mSmraiUl8p5UjOaq2RLtDucSenUILQvaXSh3Gd/DAVeUCSWIBfp9TLCe6Kdp2pKkp6 D+aTXw44q4B45WxKyfWbVTFJAATETPnh1jEJ5WtxLAHDUc+IoUZtpFEa7OhbJGnZiEFY 5GD0AsWF0ps9zqSovb26OgRxnwMirUBijEKDA= 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=ZyvU6yfxfMmdoBsp+ARyAtBH3t7rGFLZFFfr9/y649E=; b=QKn9xu5IqEx/UFwH74TYBRTlwyefaHOF/T90sc8m/1qrCU0Sq4V/QX9ZuSAudpxBPR ov3Vwj3siX2rzGQ939ibDHJa4vMlfEPHyRV67TjcB3bygs/eh2mSbGWqhTofKuTSnc56 TAG5xxqTFFC4XTKqiUrYtJN7EGNXDhJWXrk0ICOIKJP9DkeHDxwEn3ZCCnbwPN6LoPoe OqGUGYu+TMvcewEhqOXtS/LZ94SoT6KkBXZ1X516qDI+ZuvNGIB3beXyl2gvhZVaqMcY MlTnbOuHqkSaSS6Ulnv1ar2Sia7pFO3b7v0DCz9H7/z3hIRtKc47kjm5W/HTu+7sGASV XFZA== X-Gm-Message-State: APjAAAWE+MfhAioC3n+PDjywAmMHIpq95rJyvD1LaGozJYMtDUS/nTEk JSePiPXUNdemLBUme0kLhkU7YlcAjfydz5Mo2myM3Q== X-Received: by 2002:a02:1a89:: with SMTP id 131mr20815544jai.78.1556118173019; Wed, 24 Apr 2019 08:02:53 -0700 (PDT) MIME-Version: 1.0 References: <12f7d0d98555ee0d174d04bb47644f65c07f035a.1553680185.git.kirr@nexedi.com> <20190424115620.GA2723@deco.navytux.spb.ru> <20190424123107.GA32024@deco.navytux.spb.ru> <20190424142249.GA28070@deco.navytux.spb.ru> In-Reply-To: <20190424142249.GA28070@deco.navytux.spb.ru> From: Miklos Szeredi Date: Wed, 24 Apr 2019 17:02:42 +0200 Message-ID: Subject: Re: [RESEND4, PATCH 1/2] fuse: retrieve: cap requested size to negotiated max_write To: Kirill Smelkov Cc: Miklos Szeredi , Han-Wen Nienhuys , Jakob Unterwurzacher , Kirill Tkhai , Andrew Morton , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, fuse-devel , stable 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 Wed, Apr 24, 2019 at 4:22 PM Kirill Smelkov wrote: > - FUSE_PRECISE_INVAL_DATA: > > --- b/include/uapi/linux/fuse.h > +++ b/include/uapi/linux/fuse.h > @@ -266,7 +266,7 @@ > * FUSE_MAX_PAGES: init_out.max_pages contains the max number of req pages > * FUSE_CACHE_SYMLINKS: cache READLINK responses > * FUSE_NO_OPENDIR_SUPPORT: kernel supports zero-message opendir > - * FUSE_PRECISE_INVAL_DATA: filesystem is fully responsible for data cache invalidation > + * FUSE_PRECISE_INVAL_DATA: filesystem is fully responsible for invalidation > */ > #define FUSE_ASYNC_READ (1 << 0) > #define FUSE_POSIX_LOCKS (1 << 1) > > the "data cache" in "for data cache invalidation" has particular meaning > and semantic: the filesystem promises to explicitly invalidate data of Right; better name: FUSE_EXPLICIT_INVAL_DATA. Will push fixed version. > Your amendment for FOPEN_STREAM in uapi/linux/fuse.h (see above) also > suggests that it is better to be more explicit in that file. > > --- b/fs/fuse/inode.c > +++ b/fs/fuse/inode.c > @@ -913,13 +913,8 @@ > fc->dont_mask = 1; > if (arg->flags & FUSE_AUTO_INVAL_DATA) > fc->auto_inval_data = 1; > - if (arg->flags & FUSE_PRECISE_INVAL_DATA) > + else if (arg->flags & FUSE_PRECISE_INVAL_DATA) > fc->precise_inval_data = 1; > - if (fc->auto_inval_data && fc->precise_inval_data) { > - pr_warn("filesystem requested both auto and " > - "precise cache control - using auto\n"); > - fc->precise_inval_data = 0; > - } > if (arg->flags & FUSE_DO_READDIRPLUS) { > fc->do_readdirplus = 1; > if (arg->flags & FUSE_READDIRPLUS_AUTO) > > Even though it is ok for me personally (I could be careful and use only > FUSE_PRECISE_INVAL_DATA) I still think usage of both "auto" and "precise" > invalidation modes deserves a warning. It is only at filesystem init time. What > is the reason not to print it? The warning makes no sense. It should either be failure or silent override. > - "fuse: retrieve: cap requested size to negotiated max_write" > > Signed-off-by: Kirill Smelkov > Cc: Han-Wen Nienhuys > Cc: Jakob Unterwurzacher > -Cc: # v2.6.36+ > > what is the reason not to include this patch into stable series? This doens't fix any bugs out there, but there is a slight chance of regression (so it might possibly have to be reverted in the future) so it absolutely makes no sense to backport it to stable. Thanks, Miklos