From patchwork Fri Feb 22 16:47:18 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Darrick J. Wong" X-Patchwork-Id: 10826641 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C6B4317E9 for ; Fri, 22 Feb 2019 16:47:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B1D4C329D8 for ; Fri, 22 Feb 2019 16:47:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A606C32A03; Fri, 22 Feb 2019 16:47:22 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY 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 51ACC329D8 for ; Fri, 22 Feb 2019 16:47:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726019AbfBVQrV (ORCPT ); Fri, 22 Feb 2019 11:47:21 -0500 Received: from userp2120.oracle.com ([156.151.31.85]:51816 "EHLO userp2120.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725986AbfBVQrV (ORCPT ); Fri, 22 Feb 2019 11:47:21 -0500 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.27/8.16.0.27) with SMTP id x1MGiR8t159736 for ; Fri, 22 Feb 2019 16:47:20 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : from : to : cc : date : message-id : mime-version : content-type : content-transfer-encoding; s=corp-2018-07-02; bh=aryvpLPlzDyzNQ/igbspAYUr6uV3zEjGznYm0H4EPiQ=; b=qO/koWP4QOrpRP10IP42sv7Iuohpoyzrq/jrzlo/U7if5eIU/b31zIboZ3cX7rvx8+Ot tDzCfrrvuRS5rv6OPZ19uBJV5Inn34imRMucR7qJIxy1SvKqsq17Zgd5k/qSiE1abNBX SCr09EfmquLvsgODREgFghPeenCmfkG5xEvzsKwozRwiR1QWcD3dhzaaNzrUxgxLqrRo iJjDaU72S1Gxwrnp8+eJuIA4AADqYXwcKDHSNZ12elDejLgdvhg7E1eAmcLjmMUd4bna ONO6lw8IvaLSvBbtz9SoQwphOAodUBGOIWWMVZplgJwqA9yTi9boR3AWoYfw2Bqtendl 3g== Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by userp2120.oracle.com with ESMTP id 2qpb5s070s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 22 Feb 2019 16:47:20 +0000 Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id x1MGlJcn011075 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 22 Feb 2019 16:47:19 GMT Received: from abhmp0014.oracle.com (abhmp0014.oracle.com [141.146.116.20]) by userv0121.oracle.com (8.14.4/8.13.8) with ESMTP id x1MGlIw6030443 for ; Fri, 22 Feb 2019 16:47:18 GMT Received: from localhost (/10.159.254.125) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 22 Feb 2019 08:47:18 -0800 Subject: [PATCH 0/4] xfsdump: update to use fallocate From: "Darrick J. Wong" To: darrick.wong@oracle.com Cc: linux-xfs@vger.kernel.org Date: Fri, 22 Feb 2019 08:47:18 -0800 Message-ID: <155085403848.5141.1866278990901950186.stgit@magnolia> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9175 signatures=668685 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=752 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1902220118 Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi all, This is a series to update the "create file and preallocate blocks" code in xfs_restore. The first patch refactors the existing copy-pasta into a single helper function to create and preallocate space in files, as well as removing the totally broken ALLOCSP code. The next two patches fix unchecked return values and insufficient unsupported-ioctl code. The final patch upgrades xfs_restore to try fallocate before RESVSP simply because it is the newer API. If you're going to start using this mess, you probably ought to just pull from my git trees, which are linked below. This is an extraordinary way to destroy everything. Enjoy! Comments and questions are, as always, welcome. --D