Message ID | 20160719194713.10551.45137.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 1E45B600CB for <patchwork-linux-fsdevel@patchwork.kernel.org>; Tue, 19 Jul 2016 23:21:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1179A26A4D for <patchwork-linux-fsdevel@patchwork.kernel.org>; Tue, 19 Jul 2016 23:21:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 05E0E2793A; Tue, 19 Jul 2016 23:21:28 +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 6021D26A4D for <patchwork-linux-fsdevel@patchwork.kernel.org>; Tue, 19 Jul 2016 23:21:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752715AbcGSXVN (ORCPT <rfc822;patchwork-linux-fsdevel@patchwork.kernel.org>); Tue, 19 Jul 2016 19:21:13 -0400 Received: from mail-db5eur01on0108.outbound.protection.outlook.com ([104.47.2.108]:15088 "EHLO EUR01-DB5-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752464AbcGSXVJ (ORCPT <rfc822;linux-fsdevel@vger.kernel.org>); Tue, 19 Jul 2016 19:21:09 -0400 X-Greylist: delayed 7183 seconds by postgrey-1.27 at vger.kernel.org; Tue, 19 Jul 2016 19:21:08 EDT 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=8xFuhw0h0Cr7rMGtVmNjXVQaUYUkNk52ij+yD1UyN2Y=; b=ITTJaX9YZWWxqwRqcL6cnYAa4WgMUFQDtMbFX26wNCtzYHqREvcbo/S471hTJmKW/M2/nWBunoxiF0BQAxY5URysW6TxW4nqj/DZl4FMHA5e+OWNhJEvfJK5yxUzKEkQzeCAW5CEaGnH4U7SWxmbNjvH2BbJLzvVYork0CtadVA= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=MPatlasov@virtuozzo.com; Received: from [10.161.30.23] (162.246.95.100) by AM5PR0801MB1841.eurprd08.prod.outlook.com (10.169.247.146) with Microsoft SMTP Server (TLS) id 15.1.539.14; Tue, 19 Jul 2016 19:48:14 +0000 Subject: [PATCH] fuse: fsync() did not return IO errors From: Maxim Patlasov <mpatlasov@virtuozzo.com> To: <miklos@szeredi.hu> CC: <linux-fsdevel@vger.kernel.org>, <fuse-devel@lists.sourceforge.net>, <devel@openvz.org>, <linux-kernel@vger.kernel.org>, <kuznet@virtuozzo.com> Date: Tue, 19 Jul 2016 12:48:01 -0700 Message-ID: <20160719194713.10551.45137.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: [162.246.95.100] X-ClientProxiedBy: BY1PR19CA0015.namprd19.prod.outlook.com (10.162.139.153) To AM5PR0801MB1841.eurprd08.prod.outlook.com (10.169.247.146) X-MS-Office365-Filtering-Correlation-Id: fcb36783-d821-412e-0f76-08d3b00da032 X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1841; 2:YWymMBv5kGsxj0o/S5F4nEEDjhpEbiuvCKLOWrUvfsip0RGEDkZmVgZCWWN6U8SVXEPdVmnjRtFzBnyns8hihOCwMDUzNtKLlHyuMnvGo/v6QsB32JVmiOjUZTyEmV89ajkNKpWByHOwy1TK4D575ENnxloeSPyJJXVoiAtLhyjID4OtMPiS+4NyyM1szJ2V; 3:pS0R+DFZWioP1ski9nD28spHHIKUPhkLH5oVQY7lLcdWRRXw1sUnnOny1RPxfGKchqDSby4/aLXlqAhgiWWdtb3jsMjhADW9lhN1dZViyqODHhW2c2wDYdjncOKDhIam X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:AM5PR0801MB1841; X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1841; 25:hzr+Lf+477llbekPxubNIfro+V2XRlK6dGosCMitVw8TuvJ+XEWWiFTbI5srjY7umIds5aO9HITEBz4XOrVHzeSi3EhQ398FJiDE/dXXUeNwyyPHI4o6rgLug0q7Prssh+y2Cv0BgrPBS4ofrF7G6pgAds+EX1NXavvh+EmFMq0gAzF3+hM101PXOOYi+mgKMxTALOcDu7sRbmXVnfUeR/I5wR3dCVoNxCHHbikD+8S2pwpPv4AbAfMhPmLmC7p6uPnBu1JaoyGSWWeqYmONByx+tr7b5W3ebnnnrmCB2s+xVjs0hfirg8ln+3OyVhRQxoVG2l9to2hciAsYGmfSd81sd5DvLar/0Zr0QRfM6TIn+DpNHyuVBnf7NrvkG5dVhj6O2hAiy7jdU7LAmP79qJH31GcAA9SH3/j6SvLfPxOG24nWVlRrUUZvcDeLnNfooUqwE/0GMjKcbDmnGBKqauWDsJVTohtMMPV5NKt7sANpKWxcWOIgMbN8JwakrsN4mEtIVeefWKvXE2FMEqNN7cEuotxjbZfpRUpTZHvuXEMLPLJWpP3PsugtPKj48/2C6T301Z1k+b7xyjGUoD7CvyuSvN4KMADwJDxlRxKsln/QehlZKV/DMuoJTWxhtaXPZ1AKQ40ljiZOg8Kct4odVN/Fqsoo/8Izs6hqzRd/WftxMUPNruWXajktlFpFA90O; 31:xWhh5Tk61ibacqzbk44GzvOiEwf6mMSCKLloNpdZbyyogzzYdM9z8Qvmv5gyzSDOhiIa89/ov7AceF0VTquGCSmoYhRoD0Eg0QsY/LtAKeo0nCHVn0J0C1A73uIR23RQgmu190oqwy/x9VM0y0qp++Xn9Q7ApnNxKSF0VkDIae52/+pdGV2CMNX9TGvW0XjfI8kIK1PfGTW+w8BfJvkP1A== X-LD-Processed: 0bc7f26d-0264-416e-a6fc-8352af79c58f,ExtAddr X-Microsoft-Antispam-PRVS: <AM5PR0801MB184147DE113A64DA8D1C4156B6370@AM5PR0801MB1841.eurprd08.prod.outlook.com> X-Exchange-Antispam-Report-Test: UriScan:(146806924760085); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040130)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6041072)(6043046); SRVR:AM5PR0801MB1841; BCL:0; PCL:0; RULEID:; SRVR:AM5PR0801MB1841; X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1841; 4:a7uTwCsc67zWoDCSQBQuLYu5vT74QzGum1KWYuZ3vefWRLueIOYRhtEJoTceVlok1uhKyP8ti7euZNy1tUfdUtEU3k1NqQ0xgRjECa79KN3DY77c+hjPJJITAY1D5YWPoxvzol6t1G8UCMy84mBTxeqpRpsMeMOOvrC5QTA24M736o5sKYFB3xHdQQKxiBu/m1uryBAiZChU/PxEZSqotItw48WQIo2ffKjdCGVySRRwxCd6PZZwyCjpBDvVetOiHMT6T4R9GsyV2Dgj8Yv16e8AKc16IfiohV7PCysxpWKpcBy4NXGkRyRz0bvnlDq5TUfmvMuaaNsSSVLbDX4kDHLxEBfmbRlJoKlT6nuXziQxXvbXb5seA/8QHAam/CZduRVEVkDtzL0iRr9XUnE5GWllNrau6piJtjFKQwQh85JD6HVOIwhz9lIqCRolCFeSZ2y5dxU/f7d9Q/nlkPLHjQ== X-Forefront-PRVS: 000800954F X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(979002)(6049001)(6009001)(7916002)(189002)(199003)(4326007)(81156014)(81166006)(101416001)(68736007)(105586002)(33716001)(189998001)(586003)(33646002)(86362001)(1076002)(2906002)(50986999)(3846002)(54356999)(230700001)(92566002)(97746001)(4001430100002)(77096005)(8676002)(66066001)(42186005)(4001350100001)(229853001)(19580395003)(97736004)(107886002)(19580405001)(110136002)(2351001)(103116003)(305945005)(7736002)(23676002)(106356001)(83506001)(6116002)(9686002)(50466002)(47776003)(7846002)(80792005)(7099028)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1102; SCL:1; SRVR:AM5PR0801MB1841; H:[10.161.30.23]; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: virtuozzo.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtBTTVQUjA4MDFNQjE4NDE7MjM6aDA3OHJxQ1pJQ0ZZNjV6aTk3U2ZtQU5J?= =?utf-8?B?L2FmUGlPN203K21yZ0xMN0RDT3pVdG9oQWlZeFFIRkQ3alZMUUJqVFZ4SFJK?= =?utf-8?B?dVRMVXZudjd3dTY4bnNCODBjc1kxOHNGRm85UDlITTJueXB5UGV3S1A5SFFz?= =?utf-8?B?RmtQeG1tWThPVURYU3NSZEhBYXI3Q2JGUDR5T0plb3JJU3llZk00V1RaVGlx?= =?utf-8?B?MlBxekd6OUtQWkI5YUZNNU15Q09JM3R3c0cvUkJFYkVRemxYY0FnN3lyK3BV?= =?utf-8?B?MnpXOU96ZzVpR1RZditPVXFPSGYxZG9GT1BpTzk5U0tmblkwWUdjSnhBWGlZ?= =?utf-8?B?L1BDVDY4NGs1U2tMMXlIblE0K0RQMG9uWk5jcmFUYU5QUzJMYWRTV1c4ZG9l?= =?utf-8?B?SVFQUmJVUlA3VWVZMVRyMWhxd2gzSnk3ZExTQ1d5cTdHT2s2Q2orZkUvV3N2?= =?utf-8?B?TjJwOE9BbTZKU2drL243SVFvekpzeHdXcTN4ZzA1aEUvandwYzdhS3lVZ3JM?= =?utf-8?B?L1ZZb0I0bW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Vu9VCddaN7NKhAalR8GHuWH3gHlvQ8Ox9/gjr/qcWROUW/vNhZc=; 7:m8BYrpFLh3u0nLm8yTFuDbZWmJdeS549q4PkEbCdezX2PTz5BvDFpQocCEEMsPif5aHnVFhgsfkpLdJIz8MpnNHms+7XwosERKD9IyvJKGF6gj7qSykFRIi2CcPBed65pidZkkFwXL4wSzqCoTF8EOTkgVTpMU4qCecuhun7VOii8aNY+DxpcguZgHbhh0njt8scIlNLHCwxUbZX5b2DTEnLRDqBszKhcR7TcUxa507Prf40YfJLNdvjuhzi0Vff SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; AM5PR0801MB1841; 20:Okjvd6SUXbQLEpt2+u5HCrfoXz/tRbi+VSAWleW9ujpRytkrSTKr5JZIckC/u6YDBQu4O9Ap6boGNrodcBXSqyeioKOii1qAuJbb1uNzefJhV8RgjCey4UWc0cc73j9v0JTSDjTvgvIpJfxyvOrSjzoBWbVVetCA49+i5R0ZzEY= X-OriginatorOrg: virtuozzo.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jul 2016 19:48:14.4929 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0801MB1841 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 9154f86..ad1da83 100644 --- a/fs/fuse/file.c +++ b/fs/fuse/file.c @@ -462,6 +462,21 @@ int fuse_fsync_common(struct file *file, loff_t start, loff_t end, goto out; fuse_sync_writes(inode); + + /* + * Due to implementation of fuse writeback + * filemap_write_and_wait_range() does not catch errors. + * We have to do this directly after fuse_sync_writes() + */ + if (test_bit(AS_ENOSPC, &file->f_mapping->flags) && + test_and_clear_bit(AS_ENOSPC, &file->f_mapping->flags)) + err = -ENOSPC; + if (test_bit(AS_EIO, &file->f_mapping->flags) && + test_and_clear_bit(AS_EIO, &file->f_mapping->flags)) + err = -EIO; + if (err) + goto out; + err = sync_inode_metadata(inode, 1); if (err) goto out;