Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp886262yba; Wed, 24 Apr 2019 11:11:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqxc0tgT6hxaheElnQrBcS1Pjm4IMksafX497BO8G4V6nW2iX9di7Vj0r6Scnq/DTLf19yQt X-Received: by 2002:a63:ed4e:: with SMTP id m14mr32722938pgk.182.1556129514702; Wed, 24 Apr 2019 11:11:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556129514; cv=none; d=google.com; s=arc-20160816; b=M+/u0DJ4ZlTD5YTvyyxMLqZyxtYZz1j4NcF9tpdi9eUn9jYJbMhxySvRet9+klx9wk ZUiJkJ3oIaslpymMIchvhemFFvp5L3/Ld5LevXnRHew0yjnvJ0/Q8CRPkvGj1B54+uOE ufq+qelETvSljxaLqS3+6b74eeL9TV/aDKAjGYsDfFZD96jR4fbOsKsVgAa/ujCGXtON l4AuC6sMGFhs7QOqDuQcsUOXVlHQoPPSqFRw4V1CJF/BK0diEZDPApV5/9g7QajieUU2 2YLG27hELI7EO+D9AsaJCKV6DScY95qBdBL9wMtWzizDnsL5ce3vrzxI0JNcxzA7RG3f C/Ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :date:in-reply-to:references:message-id:cc:to:subject:from :dkim-signature:dkim-signature; bh=02qKTqdOtA4Z41FRFPr/vQwJc4+ocExFqDxvLSC1V3I=; b=Yzu7/FRETkPuInFZlbx9vU65QmKfEd9YYrrl+XfqH0/Wc95cJ6XP0boo7rL3zrkWeY SuUHrunYQivNuOzIggo26D5mXz4/FGjD1pqIiJC3ZZJkc1Da7O18oxATFb90LhX1W3st dyRzo/UL4vHfXc5Zj7ZZEj1jbTM4naoX4KwIWFv78A3F+stmHvTI5NqP5Pu7nmncp0Ur hlVC+7Zoac62B/o5JVHn4ArlBQrtEyh5p/qg8ZmERYAEcg/GIZ9ZAcsmdUP3pOQZ6bi3 pXURM4VwTbIIoaYPZamFCSCKEp/e/A6N89KWkmHfr4LEJJGyr/MEfLaZdKRzE6WThHmo xlhg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nexedi.com header.s=mandrill header.b="hBy+/XgG"; dkim=pass header.i=@mandrillapp.com header.s=mandrill header.b=ANT6Iuyh; 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 2si18804048pld.334.2019.04.24.11.11.39; Wed, 24 Apr 2019 11:11:54 -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=@nexedi.com header.s=mandrill header.b="hBy+/XgG"; dkim=pass header.i=@mandrillapp.com header.s=mandrill header.b=ANT6Iuyh; 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 S2388399AbfDXSKI (ORCPT + 99 others); Wed, 24 Apr 2019 14:10:08 -0400 Received: from mail133-30.atl131.mandrillapp.com ([198.2.133.30]:37211 "EHLO mail133-30.atl131.mandrillapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388108AbfDXSKF (ORCPT ); Wed, 24 Apr 2019 14:10:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; s=mandrill; d=nexedi.com; h=From:Subject:To:Cc:Message-Id:References:In-Reply-To:Date:MIME-Version:Content-Type:Content-Transfer-Encoding; i=kirr@nexedi.com; bh=02qKTqdOtA4Z41FRFPr/vQwJc4+ocExFqDxvLSC1V3I=; b=hBy+/XgGl9OPdchJqvKszqmYAdbps2EGc7JX3gbNj2mTMaBzJWgO37aSb17UlbmhNkWmn6Zh4mU1 Igs+PSr27CZHxLRKY1/hdv80UnYUILjTdpo1h+VnherKb7HHEGxQOs+Dli3NaTBYdUDl/H/sFRJb iRqB1gHrIvHwMVhGSEw= Received: from pmta02.mandrill.prod.atl01.rsglab.com (127.0.0.1) by mail133-30.atl131.mandrillapp.com id ho2j7q1sar81 for ; Wed, 24 Apr 2019 18:10:03 +0000 (envelope-from ) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mandrillapp.com; i=@mandrillapp.com; q=dns/txt; s=mandrill; t=1556129402; h=From : Subject : To : Cc : Message-Id : References : In-Reply-To : Date : MIME-Version : Content-Type : Content-Transfer-Encoding : From : Subject : Date : X-Mandrill-User : List-Unsubscribe; bh=02qKTqdOtA4Z41FRFPr/vQwJc4+ocExFqDxvLSC1V3I=; b=ANT6IuyhpS1AHjRaFL1t+JrszP6SruyrFpn/jycgP0rehHOjPqgfZTjRz4menycWIOpzhB sQ5qmnMgWLwDoz0PyoucSMYv3vqKxu3scky1B9oAMqmVzzRXXi6700Awag1RTHvTjtRS/wRC KbU/5Agof2E0jyxiuD0hsr41Wk3vM= From: Kirill Smelkov Subject: Re: [RESEND4, PATCH 1/2] fuse: retrieve: cap requested size to negotiated max_write Received: from [87.98.221.171] by mandrillapp.com id a99bf3401b104c8aad25811c1c3664ff; Wed, 24 Apr 2019 18:10:02 +0000 To: Miklos Szeredi Cc: Miklos Szeredi , Han-Wen Nienhuys , Jakob Unterwurzacher , Kirill Tkhai , Andrew Morton , , , fuse-devel , stable Message-Id: <20190424180958.GA3798@deco.navytux.spb.ru> 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: X-Report-Abuse: Please forward a copy of this message, including all headers, to abuse@mandrill.com X-Report-Abuse: You can also report abuse here: http://mandrillapp.com/contact/abuse?id=31050260.a99bf3401b104c8aad25811c1c3664ff X-Mandrill-User: md_31050260 Date: Wed, 24 Apr 2019 18:10:02 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit 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 05:02:42PM +0200, Miklos Szeredi wrote: > 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. - * FUSE_PRECISE_INVAL_DATA: filesystem is fully responsible for invalidation + * FUSE_EXPLICIT_INVAL_DATA: only invalidate cached pages on explicit request ... /** Filesystem is fully reponsible for page cache invalidation. */ - unsigned precise_inval_data:1; + unsigned explicit_inval_data:1; Ok, let it be this way. > > 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. Ok. > > - "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. Ok. Thanks again for tossing the patches, Kirill