From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751448AbdCRC41 (ORCPT ); Fri, 17 Mar 2017 22:56:27 -0400 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:54760 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751160AbdCRC4Y (ORCPT ); Fri, 17 Mar 2017 22:56:24 -0400 From: Calvin Owens To: "Darrick J. Wong" CC: "linux-xfs@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "Christoph Hellwig" , Dave Chinner , Kernel Team , "stable@vger.kernel.org" Subject: Re: [PATCH] xfs: Honor FALLOC_FL_KEEP_SIZE when punching ends of files Thread-Topic: [PATCH] xfs: Honor FALLOC_FL_KEEP_SIZE when punching ends of files Thread-Index: AQHSn4Z+6gnw9Oc9YkmYbpolm2WEA6GZ5d9h Date: Sat, 18 Mar 2017 02:54:40 +0000 Message-ID: References: <22a11e65fd5037498a78de61f3ed4dae466ad854.1489791330.git.calvinowens@fb.com> In-Reply-To: <22a11e65fd5037498a78de61f3ed4dae466ad854.1489791330.git.calvinowens@fb.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=fb.com; x-originating-ip: [2620:10d:c090:180::e4b5] x-ms-office365-filtering-correlation-id: e9b89c1c-f94e-4e62-3ddf-08d46daa1f42 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(2017030254057);SRVR:CY4PR15MB1224; x-microsoft-exchange-diagnostics: 1;CY4PR15MB1224;7:XL3IFwhidd8MilwtZMyhad7YI3x63/jKaLsVQZhkeic82WVeQX9/87T8QH50SQJEJuLVnhBNpvDAUJ2/FPJbi2NrlpD9s2rmIhc+So/DSX8jNgZogYm9vtbSIKdrxaSU6Kx6y1YNmb+PfzW73D5Eoe6Pn1Fezg1m399ijn1cvaRQFGjUbv7MJXYtD65ZYn5Ec5Ky7+iLecmiB8lWFqmtBn5LPjyE1rp43epieCOoROydeAG7ufJmZhYKW94aJcb12kWlDNABea8kOR83MXgx472TIl7QKOKiCA2LOMH4/hWHjBVfOu/1cEnrD3O123Ina7hs9FJz1W7eFfMEdw+nxQ==;20:/yEQWRuqa4BtTX+Z0osJKJPSFhAJCdMMIl4h3y0TMICcTwDYKVPVUoq98YmP3f75WPOpwODhX2+X8nug+uLM/qQDyA1tDJJViE8QuxVvJtQfnzuW219yxUsJEx/habmNumiFsWVHjzTbYo7J4Jk2wt5zu0jgkeyyaO7X1xDzDC0= x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046)(6041248)(20161123558025)(20161123555025)(20161123562025)(20161123560025)(20161123564025)(6072148);SRVR:CY4PR15MB1224;BCL:0;PCL:0;RULEID:;SRVR:CY4PR15MB1224; x-forefront-prvs: 0250B840C1 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(39450400003)(39410400002)(39830400002)(6116002)(2950100002)(229853002)(3660700001)(2906002)(189998001)(102836003)(6916009)(86362001)(77096006)(6506006)(7696004)(122556002)(8676002)(6246003)(8936002)(9686003)(74316002)(38730400002)(76176999)(53936002)(33656002)(3280700002)(110136004)(7736002)(81166006)(50986999)(4326008)(305945005)(54906002)(6436002)(54356999)(2900100001)(55016002)(99286003)(5660300001)(25786008);DIR:OUT;SFP:1102;SCL:1;SRVR:CY4PR15MB1224;H:CY4PR15MB1221.namprd15.prod.outlook.com;FPR:;SPF:None;MLV:sfv;LANG:en; spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" MIME-Version: 1.0 X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Mar 2017 02:54:40.1291 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 8ae927fe-1255-47a7-a2af-5f3a069daaa2 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR15MB1224 X-OriginatorOrg: fb.com X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-03-18_02:,, signatures=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by mail.home.local id v2I2ujR0011548 > Fix this by reintroducing the checks xfs_zero_remaining_bytes() did > against i_size into xfs_zero_range(). Sorry this is wrong: I missed that xfs_zero_range() has another caller that depends on the behavior I'm changing. I'll send a v2 with the same hunk at the bottom of xfs_free_file_space() instead. Thanks, Calvin