Message ID | 148167605339.19309.3008786993520130856.stgit@maxim-thinkpad (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-fsdevel-owner@kernel.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1D45D60823 for <patchwork-linux-fsdevel@patchwork.kernel.org>; Wed, 14 Dec 2016 00:43:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0FCA2286C7 for <patchwork-linux-fsdevel@patchwork.kernel.org>; Wed, 14 Dec 2016 00:43:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 046A1286D4; Wed, 14 Dec 2016 00:43:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 44A06286C7 for <patchwork-linux-fsdevel@patchwork.kernel.org>; Wed, 14 Dec 2016 00:43:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753013AbcLNAn2 (ORCPT <rfc822;patchwork-linux-fsdevel@patchwork.kernel.org>); Tue, 13 Dec 2016 19:43:28 -0500 Received: from mail-db5eur01on0104.outbound.protection.outlook.com ([104.47.2.104]:55328 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752650AbcLNAnZ (ORCPT <rfc822;linux-fsdevel@vger.kernel.org>); Tue, 13 Dec 2016 19:43:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=virtuozzo.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=+7TdyAghKKvC8DNwG2BVSAXOj9f/LImfZWvUWosCtCE=; b=RTDEWoEFjvirbs9cSW1P0LUIy6xyHTnpL6N0Fnc9HIdtb9mIaPor+deI++cyGibk1AyY0VMvcbN3gd8VQ4ft8H2JJzMvkHhhxqCRddkJrlhyiwkoO0oCIkFxuXzYRBTp5TKla4shR9TIGVMexNDXWc6tUIruc935Xm+tOtUc+gA= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=MPatlasov@virtuozzo.com; Received: from [192.168.0.106] (73.53.48.178) by HE1PR0801MB1852.eurprd08.prod.outlook.com (10.168.150.148) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.761.9; Wed, 14 Dec 2016 00:43:02 +0000 Subject: [PATCH] fuse: relax inode_lock on fsync(2) From: Maxim Patlasov <mpatlasov@virtuozzo.com> To: <miklos@szeredi.hu> CC: <linux-fsdevel@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <mpatlasov@virtuozzo.com> Date: Tue, 13 Dec 2016 16:42:49 -0800 Message-ID: <148167605339.19309.3008786993520130856.stgit@maxim-thinkpad> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [73.53.48.178] X-ClientProxiedBy: BY1PR19CA0002.namprd19.prod.outlook.com (10.162.139.140) To HE1PR0801MB1852.eurprd08.prod.outlook.com (10.168.150.148) X-MS-Office365-Filtering-Correlation-Id: 56119473-acd9-4e7f-30b0-08d423ba29d0 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:HE1PR0801MB1852; X-Microsoft-Exchange-Diagnostics: 1; HE1PR0801MB1852; 3:JLotR30exjY8AEmspqANYo5EP5vnIVKPAQ4orqVauDRVD/xM+nPS8uy2eI5C/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nYQBV9RC6/aZAGn3vvDPwdx8q6HmUCmeZL8bmKvagyhfG+RqBeWHFE4J/5TXQLM9iL5OWgAQss8dKC41/OiYEPHLUiRYfpWQMmb7vXoi2zaNZZiMb97/kv666DhnguzZn//CEUZ+d2QleMedRT1QJ8t9dE7AByKQ7XcjN7fI33mQS8bmCRgvP X-Microsoft-Antispam-PRVS: <HE1PR0801MB1852BF065E64C5ED6F079F90B69A0@HE1PR0801MB1852.eurprd08.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6041248)(20161123558021)(20161123560025)(20161123564025)(20161123555025)(20161123562025)(6072148)(6042181); SRVR:HE1PR0801MB1852; BCL:0; PCL:0; RULEID:; SRVR:HE1PR0801MB1852; X-Microsoft-Exchange-Diagnostics: 1; HE1PR0801MB1852; 4:0JV3pV28f5JDvVWGOAvBPnzGebRaBfrdlM9XF2aaHZW9KfeT5JwawVM/KoBEJwWIk+g1LGZ3kjuswFcyjP/Se2ZbydhRqeo1+6I4TvAJmRlMplHCxZnZudPxYRKCnNUnRUeUFBGrFC/S4Ul981nwNOmoL7/dYHG7708mRV120Ix9YgLOJw7pOwRvZhhGGKyry5b8N5mEMM4BGHAncbmIfdzXuPaUZI53KjrcXEW8iCFfWErEZYqJJ1PV2NpQiVnE3dD6MWaLBmuhNfO5E+BCA5QU9OyyDfhAAHmauPEZzuDYoBhnf2ONB6eTugMNkGnzaBpt/RQ6FFtnr8IlPMnQYjcLt13jeu+KrUDguoVsigeThhobLbEP0L/wkUKQQV5fH4vKCfNsYF2VYwkwE1ubByP5GBf/GL/6iGw8P4lp8wZW8kKLwFX5ezclro52uaBqwyThBdEaqDhLdKx/r3lt2b1gSKiWNzOeq9J6tqI9NizWx9x9NZXoRBCb6lZnb4/JQkaV0O2D3O7TVeRb8n4dkbuwQmYObcwoIccKAIBD2kwDlwhXFgqiTjB31azApXKnpoh94hZnIQKd4CSiSjl+TLDmzoPEvobdxKAd97n49ROWqA55aBmmotlEhefoE9MH X-Forefront-PRVS: 01565FED4C X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6049001)(6009001)(7916002)(199003)(189002)(66066001)(47776003)(54356999)(50986999)(101416001)(92566002)(33716001)(106356001)(42186005)(105586002)(3846002)(6116002)(2351001)(103116003)(33646002)(23676002)(107886002)(97736004)(189998001)(117156001)(80792005)(4001350100001)(50466002)(4326007)(2906002)(305945005)(110136003)(6666003)(7736002)(83506001)(6916009)(9686002)(81156014)(8676002)(68736007)(6486002)(81166006)(38730400001)(5660300001)(77096006)(4001430100002)(86362001)(230700001)(90366009); DIR:OUT; SFP:1102; SCL:1; SRVR:HE1PR0801MB1852; H:[192.168.0.106]; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: virtuozzo.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtIRTFQUjA4MDFNQjE4NTI7MjM6R3RKaVk4NHZ0QWo2emI4dXlVc1BIQm4x?= =?utf-8?B?MHVFUmpsbENTcGpHcTNvRkhwYUpHS0tOZ1ZHTnhGa3hXVVAxL2VsdEdNSFJP?= =?utf-8?B?dDF1aDJ3N0F6Ulc2L01HYlhiZ050YTlRRzRFaGoycTl3LzFWbWJuS0FJSUNj?= =?utf-8?B?MWNFY2dQU3lGcmo0TG1EV0ZBVWJCcXh4eXJrVVJyRGQ1UHN2Wk9ZVGZPRktK?= =?utf-8?B?OUtwUkdXcVVlUllQUFZDdFZOT2VVWFFHU3MzaWVHU1hIYjEzMlU5MERtRzBV?= =?utf-8?B?MFkxSy9NV24xVFArVGRuUU84ZjFHaW44aUxxaWJ5UnA0Zms5eHMzR1R5aWRX?= =?utf-8?B?cFNqcWg4TW1ZVGFUR1h5SDdLQUk0ZEErTkJpRTd4VGNrcG9yK3h1L3U5VVdI?= =?utf-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z8EcM+GymEwebWl6EhcpyCqOCik8gfQ/qfiNppEj8aKCH4qpd8MgCIjvwmoTN6rPxGBAuY+ERgJPGL/unhMYhCM= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; HE1PR0801MB1852; 7:fYMfMCLHHFQ0OR0eTW7485O08nmBeI7bXjGcw3tAKZ7sltgoEZqSipAkPK9751REpKIPrp8j9ooC5AW91lUwqrbyOaKTCx/n7WwhWmysacg0cUUfN3Lk9kavJ4iUY7xId+eY1kwO8gtt7j2KSfq7hrQF9MLRwsgC1+8SCeQMkwzQ4ACbXyzC8SNEyJPb7pmCjIB2cQd1PyFLW/mSAvQjdYVt/fZaMufByVbyPh0CiQqI+8U4OEcGQAHoXaR1Emyjs5Y+G5/2vuQfJ2xbji7Z0RbazpobLfHA9kznlB3DFuFKaIg9oAZNuroMPnWfMqhHQPKZV6xgDU0pOBimyF1QPbAYUFTdfNkDPWtd3ig+3Yyr+tAhOo1KLbRZMwM7O3nDMbf4AjNIW5bpWhk3QluTpwcSPHL9GcOXfdocIprE06Sb2TEMtNTJ9AFvJfpXa9mi4krm3uM36gBoVYVD6PP+nA==; 20:DyqzHBDUPEqwJ4XZTK5ZH2ytrGbJNa6zaQE/hYZT+QpE3YwIQYplP/u0q5cHN2BI+ZdrS1dmdSK6A1UULj1D7ju+cwBGIcaXDsscNBoqih84lG1q2HTQVtd0NApP3dND9y/yBT80DetwXqVYn6BKSiIQ0k0WTGnZzf3ngyYyjJ0= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Dec 2016 00:43:02.3308 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0801MB1852 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: <linux-fsdevel.vger.kernel.org> X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/fs/fuse/file.c b/fs/fuse/file.c index 2401c5d..9d52a8a 100644 --- a/fs/fuse/file.c +++ b/fs/fuse/file.c @@ -483,6 +483,8 @@ int fuse_fsync_common(struct file *file, loff_t start, loff_t end, if ((!isdir && fc->no_fsync) || (isdir && fc->no_fsyncdir)) goto out; + inode_unlock(inode); + memset(&inarg, 0, sizeof(inarg)); inarg.fh = ff->fh; inarg.fsync_flags = datasync ? 1 : 0; @@ -499,6 +501,7 @@ int fuse_fsync_common(struct file *file, loff_t start, loff_t end, fc->no_fsync = 1; err = 0; } + return err; out: inode_unlock(inode); return err;
Sometimes handling FUSE_FSYNC in userspace may take a while. No need to block incoming writes while userspace processes FUSE_FSYNC. Signed-off-by: Maxim Patlasov <mpatlasov@virtuozzo.com> --- fs/fuse/file.c | 3 +++ 1 file changed, 3 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html