Message ID | 20241002174108.64615-17-catherine.hoang@oracle.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show
Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9ADF11D172E for <linux-xfs@vger.kernel.org>; Wed, 2 Oct 2024 17:41:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=205.220.177.32 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727890908; cv=fail; b=XAQKt6QOXaWiuQk40MhiZ8VAiHRCC1bYvVxWlaLXLU497HIEZwy7jLS8Lx/iIFsLTeROkC8uG9HMQjXGcJJZ7koI3NHnnHU8MmMTVjubl4RcSTbBDfUf9nP2xh0MTvJ8rxgbHVG5IGcezPcCOvI1IhujOhRwVdUpkM0k1Zwmdd4= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727890908; c=relaxed/simple; bh=Zt3oJ/twGwGOQRVa/bsuq4wiLF2dlb18fQvxRTuynBQ=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=EBTO3ft4+RoSuRH4O0KtdoBXvsaN7dppUe5KN2gthgPMOVyIsyeL6QCsu8W5Z1hUp/CtfNqWCGGoaZgXjHH9Mwp32AtF/E7hpWhaDqPAOda2/t1ZThk/zDBcmumni3zoG9e6O/I9gzpQVQwPmwBCVXthu/I4ByPKg6VwfXI6kmQ= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com; spf=pass smtp.mailfrom=oracle.com; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b=koUW/4pl; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b=Dy9LkDFS; arc=fail smtp.client-ip=205.220.177.32 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oracle.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oracle.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="koUW/4pl"; dkim=pass (1024-bit key) header.d=oracle.onmicrosoft.com header.i=@oracle.onmicrosoft.com header.b="Dy9LkDFS" Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 492Hfb5g030327 for <linux-xfs@vger.kernel.org>; Wed, 2 Oct 2024 17:41:45 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h= from:to:subject:date:message-id:in-reply-to:references :content-transfer-encoding:content-type:mime-version; s= corp-2023-11-20; bh=BQgt7dGNuqV73VqoKy2M+ySGGJZUx/rhgtelARpS6sk=; b= koUW/4plLp79r+fUg0qCfe5nCOzFian6gDm9lzz9qXjuG6xpX/thwtTxVwsb1GMt GtnGGcFhFYsbpzATrVz4tauV9aQumOzINA6tQbRnHALH/hKQPY6U3jiV/2F0YrH2 /TYw0Q97BP7MZ3zY1Xu/S7QmgckLkb3yF5tcBrzC8zN/i4+R14D/hlS1pBwuwzn6 fzAZFgXHTlxQyaQIwmST354Bxm6aMm5FtdUn53nK1tmGjZmAY/yAZ+Gbf6ZqPsNF WruwAtwS1r5YsZDQkWu0/cvYJlENck+vC8DMW9gaeXYnMTggD9EYoss7hmHa3BJ2 8zGfb05qy+x9wQdU66Fj0w== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 41x8k3aebm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for <linux-xfs@vger.kernel.org>; Wed, 02 Oct 2024 17:41:45 +0000 (GMT) Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.18.1.2/8.18.1.2) with ESMTP id 492GiOUN039265 for <linux-xfs@vger.kernel.org>; Wed, 2 Oct 2024 17:41:44 GMT Received: from nam04-dm6-obe.outbound.protection.outlook.com (mail-dm6nam04lp2043.outbound.protection.outlook.com [104.47.73.43]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 41x88978a3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for <linux-xfs@vger.kernel.org>; Wed, 02 Oct 2024 17:41:44 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=djtrlGsoruD8eGMabplxvvuu9JQHWQ2/maH9447oaWiUqX1BtmE7YMfMSMYT+IRcShv7H0xHHpvHTXMdD+CCfctC6w1sH2HtSRJyyDoiNP2oauXGIBb4yqI0rjqFG7nwRyx4c0VhLSv9gtlh0zKlvK5lb5x98LGnsTVWyVGfClIunTkvFTDy+uQKoqd8CYYbcT28aXquxbmetTM9UU241VwV7pLb5KOLPHzm0b5lr0wxuNfo4/jnFk4Bj6J3oJuKXLa6pLCYqoipXc3SdTer08W60qF+mFVxImMUHM/uEgrLajdZGsDSQCOQYsCITJpwIg7bK7gFqVq3uTwWuKdmzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=BQgt7dGNuqV73VqoKy2M+ySGGJZUx/rhgtelARpS6sk=; b=XA1jsaqTNJyu9rlCH7cfEVbby6ljRBJVQPpgegee1eB2GSE+UU53qhsF2eCwcrthSMaWx4pjTHDl7IyzeENIBKX/529YsjwUzmtkKMgtI4wbz9BMwoWRHmvbyFDKdLLgS9ofpInQ3zgXdPhlL7VWslxGA2vP4KcyjBvqujX4/xnL9FCHhmMU6FEfVX9NVblHPGOoszUIWhGpAOYSuLbslKqxknWiMDh/2wJSk25hRyGn6XMArktYAC3AOYj9I7HoMpp2IliiIXTZZuykdDbHFWcCQ5xbf7HKzJPvMUWBtphuplyhSxB7u+4YNrJXhVmlbAnyv2SNKZM9ADJ9IEtc1g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=BQgt7dGNuqV73VqoKy2M+ySGGJZUx/rhgtelARpS6sk=; b=Dy9LkDFSO5J2v5Y+lkzijOzjSkkB8F7KAm4sugTASK510Mk12vX1rdQOLx22MaxbtX9vDPdkewczErYpi+szGBbayvzVkRpDPhCdnQPMRq/ccwCZbh0mKeIB0B5Fec8ChNoA2U0OUpRqhIquDiU8kXqN3W/PTk9hPZH7RPSm7K4= Received: from BLAPR10MB5316.namprd10.prod.outlook.com (2603:10b6:208:326::6) by BLAPR10MB4995.namprd10.prod.outlook.com (2603:10b6:208:333::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8026.16; Wed, 2 Oct 2024 17:41:41 +0000 Received: from BLAPR10MB5316.namprd10.prod.outlook.com ([fe80::a63b:c94b:7ed8:4142]) by BLAPR10MB5316.namprd10.prod.outlook.com ([fe80::a63b:c94b:7ed8:4142%4]) with mapi id 15.20.8026.016; Wed, 2 Oct 2024 17:41:41 +0000 From: Catherine Hoang <catherine.hoang@oracle.com> To: linux-xfs@vger.kernel.org Subject: [PATCH 6.6 CANDIDATE v2 16/21] xfs: allow symlinks with short remote targets Date: Wed, 2 Oct 2024 10:41:03 -0700 Message-Id: <20241002174108.64615-17-catherine.hoang@oracle.com> X-Mailer: git-send-email 2.39.3 (Apple Git-146) In-Reply-To: <20241002174108.64615-1-catherine.hoang@oracle.com> References: <20241002174108.64615-1-catherine.hoang@oracle.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: BY3PR03CA0020.namprd03.prod.outlook.com (2603:10b6:a03:39a::25) To BLAPR10MB5316.namprd10.prod.outlook.com (2603:10b6:208:326::6) Precedence: bulk X-Mailing-List: linux-xfs@vger.kernel.org List-Id: <linux-xfs.vger.kernel.org> List-Subscribe: <mailto:linux-xfs+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-xfs+unsubscribe@vger.kernel.org> MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BLAPR10MB5316:EE_|BLAPR10MB4995:EE_ X-MS-Office365-Filtering-Correlation-Id: d87975d9-a34b-453b-fba3-08dce309796f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|376014|10070799003|1800799024; X-Microsoft-Antispam-Message-Info: IN8AZwB6tbxjmpq372RxhZc9hb+ES/GUQm4p8TapZx7lvOoDb2JurWqwqdi952iSUFElhRiM9v05NSyspxpAwQpgS7OZy8yIadWouQ/GI7LB8jInCwSFu9/7gr3+Jr5cpxpvpL/0VIxf8N3iLhv1UpCbPmpoOYkynW5rulC/oI+H+C1hXcLPVFCe72UHCMJED6huN7CC+JSZx07pdarhA43gV8lba4MzPhaGVSa2A18u0r7RkqyVqnCUbryflrz2OYexxlrvEPicEzkReKx5jOtBhzPRl1QDYHUocLC4P7bOCXfHnor2fZ6Q+bMdZTPP5TIsLEZj4NwILz+HXR7Cqg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T:NONE;SFS:(13230040)(366016)(376014)(10070799003)(1800799024);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: cOFkZWzLQUqSs0do43i07TIwnPq0o+ozmUgRppJQup9b3whwAro/kIaqEw6PF7yj2ig46HDFMiMn7p3dochmr7DMFqkzg32f3Y0HXGqEvZvDoP4yw7uQliS/iiMV1ET1saGD10OQ24cYq6fEywB/CSXrSUw5JdqXsDIGMNeifBHxM6zxQEEW+pcEEGVvthxdQ3Ifzz5VoBv5IJM6d4KLHBO4MREy8X9iIK6fuad6fYPKgO2fUkOJVJDqc/y8l7ZX3Xh6WTE9PegaOxuUSgIyKUYuD327MsEjLWUBmNwxYG6GsUmSbAiTnoq4c2D+0YcEeFLpbf3HOmqky1t9lEcVfMztrsMee2fIUOZmQLBgjijw9QGWr5Jnnnr+uKQLzqOwWBnLKl6EIP/+2RfjsEhOKBW2qmnO1nd0U8e3xImAsgGWGGcSJ7Uwk9fm3Lr89/w2yW6jnYT4vwDKOh/3DP5L74rxj5IycenmAjcO3m485BuUNouFMVypO0dbfKLJOodDtev1Q85WRq3YGZTBfBFcJdcZoyAgx0QTluZWhjRF7s00Wi4taCVqhqqvZdgkijgNSqoUMPATZbZS9sQo96OgweJTQfj6S6xj9H5Vqi57UlaysHu80VqsNYWQ3YmJypQYpexnsDxHadX28iWQn8Srxxa3xD+YvTm6AtthjXgaFxSZRijRjHLXEHdB2v2j1e/fE3UpJxxzSkB/2dClpgArLPJDXWRtQNQEKthmPnY2RufdVfEjhi+2EaELJPYeLZui+KNsmOGvMUn0UddqOy/7pCvE12Mw5Nw1yldqsD/MxZ0uGViR2/Vzob1Cnl+xfzhhNNd0UyQXNrLOD/3EgCvTZ7WTr+uRMwlHYrLVSOYKhh2dB/qJUzOaQo8aK05nmqaggfiXcEBEYpnEsTdCxD0i+1CmMylZFkVOrL9Y201UR06x734HWQtOBc+oyVELwTkTLGyHE/V90t8Z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XbjYZAv8BR932DPg92Oi/KKdttF0kIBSytXMzCNcUFZsY857OXMMjBoNHZTbT8zvTsYbRgOUWxw/tdgnvj+2OmeICL590HfUdwc8XhMY2xnwNdpNikkagGNfZPSAJrIdxqGAFCEmrp3FyeWSFHRh9ubyStk2HDH1ExD8fwXX+w0U32W4tj65KIAhSt/EqY7QJOa3xiU397ifYy2t2Lp5fG7cAT+VgrFSNEKxVTfR+aOP3+AIV+1nyzX7hqoM5MNnZTonvJqyjvgKBqJSxPBESeKgTsx/uYTB/XTZjip86cPnQ9hIiMT0FneIyyfwRccbQI= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: d87975d9-a34b-453b-fba3-08dce309796f X-MS-Exchange-CrossTenant-AuthSource: BLAPR10MB5316.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Oct 2024 17:41:41.2679 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: TgCjTlndTLxLdul5Z2KqQQnQQrYWEOPCzMOk6AWokUV5s8loEIUQh8KpogzX/Q5Vhj0g1X3ulvi1wPDudM4KKOaRQG4+WbVP/nYMXyY0VR0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLAPR10MB4995 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1051,Hydra:6.0.680,FMLib:17.12.62.30 definitions=2024-10-02_18,2024-09-30_01,2024-09-30_01 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 phishscore=0 malwarescore=0 adultscore=0 bulkscore=0 mlxscore=0 suspectscore=0 mlxlogscore=999 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2408220000 definitions=main-2410020127 X-Proofpoint-GUID: aSChuWXs2PRWVRxUe0h1JMD6KrOR3zIp X-Proofpoint-ORIG-GUID: aSChuWXs2PRWVRxUe0h1JMD6KrOR3zIp |
Series |
xfs backports for 6.6.y (from v6.10)
|
expand
|
diff --git a/fs/xfs/libxfs/xfs_inode_buf.c b/fs/xfs/libxfs/xfs_inode_buf.c index 0f970a0b3382..51fdd29c4ddc 100644 --- a/fs/xfs/libxfs/xfs_inode_buf.c +++ b/fs/xfs/libxfs/xfs_inode_buf.c @@ -366,17 +366,37 @@ xfs_dinode_verify_fork( /* * For fork types that can contain local data, check that the fork * format matches the size of local data contained within the fork. - * - * For all types, check that when the size says the should be in extent - * or btree format, the inode isn't claiming it is in local format. */ if (whichfork == XFS_DATA_FORK) { - if (S_ISDIR(mode) || S_ISLNK(mode)) { + /* + * A directory small enough to fit in the inode must be stored + * in local format. The directory sf <-> extents conversion + * code updates the directory size accordingly. + */ + if (S_ISDIR(mode)) { + if (be64_to_cpu(dip->di_size) <= fork_size && + fork_format != XFS_DINODE_FMT_LOCAL) + return __this_address; + } + + /* + * A symlink with a target small enough to fit in the inode can + * be stored in extents format if xattrs were added (thus + * converting the data fork from shortform to remote format) + * and then removed. + */ + if (S_ISLNK(mode)) { if (be64_to_cpu(dip->di_size) <= fork_size && + fork_format != XFS_DINODE_FMT_EXTENTS && fork_format != XFS_DINODE_FMT_LOCAL) return __this_address; } + /* + * For all types, check that when the size says the fork should + * be in extent or btree format, the inode isn't claiming to be + * in local format. + */ if (be64_to_cpu(dip->di_size) > fork_size && fork_format == XFS_DINODE_FMT_LOCAL) return __this_address;