From patchwork Tue Dec 10 08:28:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: LongPing Wei X-Patchwork-Id: 13901028 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 98633E7717F for ; Tue, 10 Dec 2024 08:29:07 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-3.v29.lw.sourceforge.com) by sfs-ml-3.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1tKvc9-00021K-Ir; Tue, 10 Dec 2024 08:29:04 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-3.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1tKvc7-00021B-Uj for linux-f2fs-devel@lists.sourceforge.net; Tue, 10 Dec 2024 08:29:03 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=MIME-Version:Content-Type:Content-Transfer-Encoding :Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=q+SAZQswD+sWPjsYSJayxIdoK3eMB9BkRfjdxEU0Y3A=; b=Xjpg8AVVngMSjMz6O+693ZMSIK sj7qyxxk3P5cb1FSOBhwrDwJg5Z8JTOKMVKsOsTniDKYrWXdqExkfZMf8/rIA91loMhB8VNxLBCYa IQ/lvXsX6Y7IvfW3pbXpZMImnPeNxu69ky1icf/MPeP9Icah3Bp995aejuYRPdVHcpeA=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=MIME-Version:Content-Type:Content-Transfer-Encoding:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post: List-Owner:List-Archive; bh=q+SAZQswD+sWPjsYSJayxIdoK3eMB9BkRfjdxEU0Y3A=; b=j WFjNu1jCM62W/xctgQuDdaIDy1ELpKvrPNRfi168RmOIzAL0GSRUb9CSrxqNMkpdnFOIdxdAs2Ui9 T5ngV7plzzinspjAyVM2hdQ0N9CKS8m1kXfpK+42PuEmt5tiPWdAc1q65VbADrpdknX1IZgkqU7Sg PLxsBbSJf24kuhMo=; Received: from mail-psaapc01on2065.outbound.protection.outlook.com ([40.107.255.65] helo=APC01-PSA-obe.outbound.protection.outlook.com) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1tKvc6-0006Ls-FQ for linux-f2fs-devel@lists.sourceforge.net; Tue, 10 Dec 2024 08:29:03 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=yvLUU/ky4NGI7GbANqnT8/r4s8lr+F8mdEs+56yDm0vNKgKV/CK7uIIqoO7GRCQ29wzGeqy3CBKBlI3R6fo1WDajsiM0wwndLMwD/RiFnr6SMe5vs6uE620C/R4033+DHceOExu3DhNZbKtbrnz9YhikpdXR8wNevCQsuiNkCICxz3MHKyfW6DfYfmzZwbFBOK+ih1Om0G53gmV0V41XWfjjp1JrWvcvnUhtU1lRdnID9I/1HMViNkWz+Y12d6Bq/HvcE+bhHZZ2Q+GT2UHwxbsLIYI3OL9UQkuvkcsLcj30KMzOHf+oITRwKjFSq2OFQ96h2C52H6CpPtL9nI62eQ== 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=q+SAZQswD+sWPjsYSJayxIdoK3eMB9BkRfjdxEU0Y3A=; b=d6B8V4dQ3FqxN3DqYXPsxE7bvxbvQhCF4XshGeXQHNo8lPbxWVrfvQiy3S02KjaZlumHhts1LJ0uCNAEI4PJ9aqGvQNIdIrwE3XbBItgwRNtG+RzNa5IvCettcYjKzv0ORAFCXg6Ah2waylQ4ZTBB6nEcrIe9J1A6O7iiC1bOBZR09xdtkdxeneAF1Ky+tayEoJomAu92hFQMJQ9C1FRRh8smKlfKgi3IH+UY0WiZNMnU6Udg3NgRc9ZJd4nf7KWbyJKhKKiIouRADN404vcGpmmrv5OCEPZk1vb61ljPgwHKUoTt2F42ihWJKi4gQejUr6ehRavLXWzC6gnX5UH5w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oppo.com; dmarc=pass action=none header.from=oppo.com; dkim=pass header.d=oppo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oppo.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=q+SAZQswD+sWPjsYSJayxIdoK3eMB9BkRfjdxEU0Y3A=; b=PaK1k+jGlZY4qtr8By8SV6AAy2k1c8jX10LfrNCj7eXBXF7dTX1gZSV6Nk23apuhvIWPVDGrNliHzT6XLlxxzwU0J/GeYFUtTsuMMp0q5E320JuZP44RURnPE21FPY6Iv/7oXy2pMKfWSjQbnPTL2vC/wXwExmBhBJnhs0nHfAA= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oppo.com; Received: from SEZPR02MB7967.apcprd02.prod.outlook.com (2603:1096:101:22a::14) by TYUPR02MB6251.apcprd02.prod.outlook.com (2603:1096:400:35a::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8230.12; Tue, 10 Dec 2024 08:28:47 +0000 Received: from SEZPR02MB7967.apcprd02.prod.outlook.com ([fe80::5723:5b88:ed4c:d49b]) by SEZPR02MB7967.apcprd02.prod.outlook.com ([fe80::5723:5b88:ed4c:d49b%3]) with mapi id 15.20.8230.016; Tue, 10 Dec 2024 08:28:46 +0000 To: jaegeuk@kernel.org, chao@kernel.org Date: Tue, 10 Dec 2024 16:28:01 +0800 Message-Id: <20241210082801.4104194-1-weilongping@oppo.com> X-Mailer: git-send-email 2.34.1 X-ClientProxiedBy: SG2PR04CA0207.apcprd04.prod.outlook.com (2603:1096:4:187::9) To SEZPR02MB7967.apcprd02.prod.outlook.com (2603:1096:101:22a::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR02MB7967:EE_|TYUPR02MB6251:EE_ X-MS-Office365-Filtering-Correlation-Id: c0f55395-a479-48f8-4ae0-08dd18f4aa1e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|376014|366016|52116014|38350700014; X-Microsoft-Antispam-Message-Info: xl0VQp0C6E2aESSI5/HINpqz0AfFz5x2eY6DfbMaFLCR0yud+1T/yKkAUvaVzZ4J5HxZ2Yj+wx5PbGVAllN4tpunr5kFVn6BUoCEmbkfJORyEjpdllHj1gs17wXfsmsvFKNBy8OhsBgFLg5fR4OLgPYPDTBkbONI0WubWb74lPVFtpldu74ozC6o2f620z1YmtmufbK9U9GR44o3JanqjYPGFKLkR80Dzzj118xyIeKY7cE2rS9nXWh8O1Au4+Rk9lASeIU36MFNfVgxY099NLQn2SQRSQe6jgDbYB1Qjm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CFUtiSAwZ8dU2v0Oyq1N/7rPSIo4LZwGN5NeynbjGx4NGlERcm2IQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SEZPR02MB7967.apcprd02.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(376014)(366016)(52116014)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: TMuW1XG6fwyiyr5NMZHezfSxHf4jAY9ta2CHDveKD9Rz9piYbne74YGpPn/9c+DJiBwaepvI+wKvyulweJ0Lk/DB/mwF40fCHmfcT6NLWrkhuySPyHmYEwxWha6GbCqsK3A4I+xdet9YS+dA2VThECFkAoP0GJ4izAsqRuOyf9XD+z+0mR37BS2S8V3FUBrJwdk1zhNkAnZhVDmCwZBj2pQqpbYqTf4+te974AMM6LDbU8CCoGIJuaDd5AIujA9hkJDfLLMcBDmoyBoNyPQtkpCeoQV83rmEJmK6vj4GQuNZRFTYBZf25pD4BV9rytNFG/H5y2aIdZKv4ojwUfvsO4S93Tj8jhzV0ZhxY7uI9Mu8ntTOGsQU6w2v2pk/aKLJT1zd1ZOPFk2B9e+6VldGs1Pcf+8Fj+2FKI94MkY6e68L11sabdE6LcyR+O117lmuIspzARXcOcQ/i4UoAg7k8yCD0IcjBGb+X+/Ux+p7V4xWwOCw/S1P+PHQ3XciE7hFuz2Ni3kG2jUK6pzxhNjwUaCR6dfG31jZ+nfGEmgLEGgZetAAxqm0FltKejVoLveZDaFbDBc/26yFOd0CD2eD9LYpQ0TOjEY7EYdfyarqovjCKJ1utCuiylfhQo1UzCtORh1AYk5sKOC432rsiPcMU6Kzprw+g4JhafP0aboiDY4Yl7H0Ms6ltzYuY8bTbKFL0lMbChyw1rwkJRsLmAjLFPO5UImH3tUVack8X0r/TiFZGOaxF18zg2yzO7BowLzNo3KYh/SQ4d8w7rKO21gvdJsaV1StITESWr9KjD5TCJ1EgUL+pGcG3EW0f/gqNerm2boS0jo3yQEp1PXu6uuHPn9paFKsEGOBfcpkTn0oLWAHzI7eK5zIwo1PH03i2muiGiYs3EdM3n+2KKnxyFJsbI5HOf0mk2FJ7k7D1sYYPOyqVPZPbpkYrIo0XXovLiGWroHXVtMFlkVH3QciRDnF8AmwBooLmsACicd/Hkp3B/NbcPXuYmlfMIC0qTqUTiJfW+pNQ8znKC6lx38Dio09xLU7gjsZElurjannUwugDFpeZ4KDHyOnzX9SoD1NLZpJ8cH7qs/9ioFq5EL5GwlVjDsG2YH/rVGj8OY2zRUOMlofe72fPw45CsqWueD6eHiSa5Nk/jZ35kbmFtDIySdasnGDsYVFZzwb9M9U8HYWv/vSatzRv1mLYgZd/Mb9wTQ7Rao0vBWiLL4RrRoKd+78MVmo/1p3mapglaQTFI5uAWhkHnpjC2wt/5CyVwKTlgn5e1mXkeOJso/vHQVGSk31QzkeroWkdvmASzcQDa8BQDpmBxAXnRltUdVfsjA12kPG1Ort5vW06iJoN9bBFmm87UvNbg9T+HX9J8I7xiSd3AiQOmG74tS5hxam5eqwLWklQbLV+0NSJjkXTrkEebESRXuNYbrxp8ul9xTi5PO/fQ6OvaOyYemRTdWLuAwNDHZkKmQJV9vU591rhtnSx0ZWh/NDqxy5Nqyhl6uakoBPcZD4ZfAufCVSAPR9Rar+i6WiuuASLx9wIYMdH+TKfybVRGK6AxtOBdzI01oldRbkKvLu8al0spA0K9pLj+BrWJQZzbi+v02uxMBsat+J13oyvA== X-OriginatorOrg: oppo.com X-MS-Exchange-CrossTenant-Network-Message-Id: c0f55395-a479-48f8-4ae0-08dd18f4aa1e X-MS-Exchange-CrossTenant-AuthSource: SEZPR02MB7967.apcprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Dec 2024 08:28:46.3993 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f1905eb1-c353-41c5-9516-62b4a54b5ee6 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Oq0bTIIgcB5sY46lcoYoCrflN9zlYFQ1ump4V+LvpLr7hx0W39qgBLgPM+PLy+tnNJIxV3wbw2PBnr7hequj6w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYUPR02MB6251 X-Headers-End: 1tKvc6-0006Ls-FQ Subject: [f2fs-dev] [PATCH 1/2] f2fs-tools: use pread and pwrite when they are available. X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: LongPing Wei via Linux-f2fs-devel From: LongPing Wei Reply-To: LongPing Wei Cc: panglu2022@gmail.com, LongPing Wei , linux-f2fs-devel@lists.sourceforge.net Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net This patch want to reduce the number of system calls to improve performance. pread and pwrite will only be used when the target platform support them. Signed-off-by: LongPing Wei --- configure.ac | 4 +++- lib/libf2fs_io.c | 29 +++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 2053a65..439b97f 100644 --- a/configure.ac +++ b/configure.ac @@ -182,6 +182,7 @@ AC_TYPE_SIZE_T AC_FUNC_GETMNTENT AC_CHECK_FUNCS_ONCE([ add_key + clock_gettime fallocate fsetxattr fstat @@ -193,7 +194,8 @@ AC_CHECK_FUNCS_ONCE([ keyctl memset setmntent - clock_gettime + pread + pwrite ]) AS_IF([test "$ac_cv_header_byteswap_h" = "yes"], diff --git a/lib/libf2fs_io.c b/lib/libf2fs_io.c index 520ae03..a8430c9 100644 --- a/lib/libf2fs_io.c +++ b/lib/libf2fs_io.c @@ -279,6 +279,12 @@ static int dcache_io_read(long entry, __u64 offset, off_t blk) if (fd < 0) return fd; +#ifdef HAVE_PREAD + if (pread(fd, dcache_buf + entry * F2FS_BLKSIZE, F2FS_BLKSIZE, offset) < 0) { + MSG(0, "\n pread() fail.\n"); + return -1; + } +#else if (lseek(fd, offset, SEEK_SET) < 0) { MSG(0, "\n lseek fail.\n"); return -1; @@ -287,6 +293,7 @@ static int dcache_io_read(long entry, __u64 offset, off_t blk) MSG(0, "\n read() fail.\n"); return -1; } +#endif dcache_lastused[entry] = ++dcache_usetick; dcache_valid[entry] = true; dcache_blk[entry] = blk; @@ -393,10 +400,15 @@ int dev_read_version(void *buf, __u64 offset, size_t len) { if (c.sparse_mode) return 0; +#ifdef HAVE_RPEAD + if (pread(c.kd, buf, len, (off_t)offset) < 0) + return -1; +#else if (lseek(c.kd, (off_t)offset, SEEK_SET) < 0) return -1; if (read(c.kd, buf, len) < 0) return -1; +#endif return 0; } @@ -535,10 +547,15 @@ int dev_read(void *buf, __u64 offset, size_t len) fd = __get_device_fd(&offset); if (fd < 0) return fd; +#ifdef HAVE_PREAD + if (pread(fd, buf, len, (off_t)offset) < 0) + return -1; +#else if (lseek(fd, (off_t)offset, SEEK_SET) < 0) return -1; if (read(fd, buf, len) < 0) return -1; +#endif return 0; } @@ -615,8 +632,10 @@ static int __dev_write(void *buf, __u64 offset, size_t len, enum rw_hint whint) if (fd < 0) return fd; +#ifndef HAVE_PWRITE if (lseek(fd, (off_t)offset, SEEK_SET) < 0) return -1; +#endif #if ! defined(__MINGW32__) if (c.need_whint && (c.whint != whint)) { @@ -629,8 +648,13 @@ static int __dev_write(void *buf, __u64 offset, size_t len, enum rw_hint whint) } #endif +#ifdef HAVE_PWRITE + if (pwrite(fd, buf, len, (off_t)offset) < 0) + return -1; +#else if (write(fd, buf, len) < 0) return -1; +#endif c.need_fsync = true; @@ -663,10 +687,15 @@ int dev_write_block(void *buf, __u64 blk_addr, enum rw_hint whint) int dev_write_dump(void *buf, __u64 offset, size_t len) { +#ifdef HAVE_PWRITE + if (pwrite(c.dump_fd, buf, len, (off_t)offset) < 0) + return -1; +#else if (lseek(c.dump_fd, (off_t)offset, SEEK_SET) < 0) return -1; if (write(c.dump_fd, buf, len) < 0) return -1; +#endif return 0; } From patchwork Tue Dec 10 08:28:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: LongPing Wei X-Patchwork-Id: 13901027 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id AF2FEE77180 for ; Tue, 10 Dec 2024 08:29:07 +0000 (UTC) Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.95) (envelope-from ) id 1tKvcA-0005lO-LR; Tue, 10 Dec 2024 08:29:06 +0000 Received: from [172.30.29.66] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1tKvc8-0005lE-9A for linux-f2fs-devel@lists.sourceforge.net; Tue, 10 Dec 2024 08:29:04 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=MIME-Version:Content-Type:Content-Transfer-Encoding :References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=nsvXxv1DDPHofLn2pOKb8xisA+DzNG2Z/Vo7ipnVzxI=; b=XnJdkZbYjg+uNUG2Jym/o1j5Ds 4TNuSJBaKwaRWrOsgX4+2Q/sbM2VzF/qiuxaG/JNpyZyReiSFHWuBDNTpgaHqihpIv/JT/221WOHw VhQHAyrJ/H3YQGgLgitvvFHrpgQnAipgTMLHVQviGRZGJMgx6sZ7b+e8B8f2uUyq5mhw=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=MIME-Version:Content-Type:Content-Transfer-Encoding:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=nsvXxv1DDPHofLn2pOKb8xisA+DzNG2Z/Vo7ipnVzxI=; b=LrwDTAUfs0oVelHYKE/6jHq1gl 7CeE0R+lhs4Lv/jtbPc1Gj3AOt727z9iTc+yzq64iOORkb88C2sG+Q1kGmGHy5Z+XmUSGxXHATQU7 /zv0vsBOq+E4oiQgNM62+n+kR4T33YwiMumsTnPtEg/1xXGIr72nyFuAwWAQ708k5e6M=; Received: from mail-psaapc01on2065.outbound.protection.outlook.com ([40.107.255.65] helo=APC01-PSA-obe.outbound.protection.outlook.com) by sfi-mx-2.v28.lw.sourceforge.com with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.95) id 1tKvc7-0006Ls-Kc for linux-f2fs-devel@lists.sourceforge.net; Tue, 10 Dec 2024 08:29:04 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=lYqjosgm6QeDlnCdlK0MD4x3IIdhqj6auTT5khBMoCu2JWcKPYs2sRIsP8T/XPkkOtkaOQPzlVkFjJR9m74zf9z4UBQaiZoTGAd4PstU4e/m1Naga8aKHO4i9aZHekEkl6gZbEblVtF7t8khjvm9jHPmDXVYDWcnshRJ1+zdBBFT1Y559oZqIB4TzDNgDNWosK5gZ0VpClAmLx7nIKhFk7g3KU//Sq3ViBZNMZkk9wKbkJSXkpu7ekpz8s6rXZlXsMx9NMvNZG7sQshIgAGhjXAoHv5XX8CJe3Ty2QTLUeT0mqyUb+q3rpJnYKdG3gE8SM/7CnCFao3DH9FCSyNufw== 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=nsvXxv1DDPHofLn2pOKb8xisA+DzNG2Z/Vo7ipnVzxI=; b=AIHOShY212LmIg9W5Iclj5NMzm1hQY2FanSi0rl9yvskZfI7X4Is54fEPHoeNjiWF57iU/5K7FLca4/F/trHiuMcA/5fiKSNGxugJP/MvyP/Ix9z8CTIAGq4/Z55TQIkihhjFEt6H6vueJFNHIFQ1+oRQgwzU8VB/wJK4CAeN7HQ1EzKhReN2faz26pfbOeFSPQKtLXL9RND0ZELtnZpALqrJalJc5U4WNwm3oQX4O+iYhnjzLs+1akFyYxF7giIM76EIHHdcP6Ye5vUWEqZ/6Hn4BpW1PVtaDyYHSKT+eU5yY9H4RE+NUJVb18fSGuwaVMTngH0wHdUrCIa0S+Ynw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oppo.com; dmarc=pass action=none header.from=oppo.com; dkim=pass header.d=oppo.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oppo.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=nsvXxv1DDPHofLn2pOKb8xisA+DzNG2Z/Vo7ipnVzxI=; b=pSIiE1dYrD8BANsCTppnO2qc6Khbgdu2Qg8T2t+FpIY++SQ4uD5k0eFvs8SuE2yxqwOnQqklbq2qolM/ms1c6oC986zmAFsZNBytGs1qcD6FcJwvXbryPgh+0aUwbNam2D63CJ3G3PqvEzDaz2RanEGBE5J8e9XnuOPU2ax/etU= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oppo.com; Received: from SEZPR02MB7967.apcprd02.prod.outlook.com (2603:1096:101:22a::14) by TYUPR02MB6251.apcprd02.prod.outlook.com (2603:1096:400:35a::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8230.12; Tue, 10 Dec 2024 08:28:55 +0000 Received: from SEZPR02MB7967.apcprd02.prod.outlook.com ([fe80::5723:5b88:ed4c:d49b]) by SEZPR02MB7967.apcprd02.prod.outlook.com ([fe80::5723:5b88:ed4c:d49b%3]) with mapi id 15.20.8230.016; Tue, 10 Dec 2024 08:28:55 +0000 To: jaegeuk@kernel.org, chao@kernel.org Date: Tue, 10 Dec 2024 16:28:03 +0800 Message-Id: <20241210082801.4104194-2-weilongping@oppo.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241210082801.4104194-1-weilongping@oppo.com> References: <20241210082801.4104194-1-weilongping@oppo.com> X-ClientProxiedBy: SG2PR04CA0207.apcprd04.prod.outlook.com (2603:1096:4:187::9) To SEZPR02MB7967.apcprd02.prod.outlook.com (2603:1096:101:22a::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SEZPR02MB7967:EE_|TYUPR02MB6251:EE_ X-MS-Office365-Filtering-Correlation-Id: 2eec5177-b2d6-4805-f879-08dd18f4af4a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|376014|366016|52116014|38350700014; X-Microsoft-Antispam-Message-Info: Y4Rnj9dsLALSj+2E/YAQmnIsV48yWNEi0+Uj1X6Yx8fjrq6aWc8xAVmLWgZzL8xsdrNGLbJ/vU74yzc19jmoHRpWEQYvCMDgTfP8iIos4CsmdkQQkcz6t4ilnPduoNgr8LoZfmxIixevNDGCb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0nL8YpXsfAqYabWIuuJ1jzITYp8c4tmVd3mrlZKrNuTqpB2ggMSZgjwq/rOcnIxpUD2a8Xca9F+3Ied1CxtEQjbK1/h8ayu/hFkdH7GkI3dC1NVUDSXF6bw+HUhhK5hjO8xQ8HCHX7YptYadOJvo+OP1/e8D1qxDmOy1edpjc7P3SJ+J49QGRug8fSdGK9RmGxYE/ktHxgNvnjKug1A== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SEZPR02MB7967.apcprd02.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(1800799024)(376014)(366016)(52116014)(38350700014); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: c1Ts8WpNr4yjMzWCVTgQ92Vk8dt+meRgTXcvT9LXELJTtStaTvielMfmk0/I0Rd6ntnNoPpVU+gzHEtxAktkb/0gFuM+zgRLdpk58/0dkkRq/lZo+eYiytWe0zU7+vYghyuavuTx8htxJhEuPOg55h5BaLPONOjA2jhiZ6hfwrLuXH+EM9F0ufFmUjXnFR2uTAUfBeBbZ+tjVadZNsUhzvHFLtSk6nwEDEew2h7Ey465Jqv4j6zuWLphXpe3ixbIRnQQDx3x5yYf3Ey3XXXKYWCjLREt0WZjdHKsdQ+lfSlII+IVOQpK0t+8XB5wnTZxevPNaOJGGH/uK537RMudWCLyCApFOCuDkiB4iyGn04kHPFF9enpTB/VLXm5SX79ffvehUjTDw2AOb0oDdQt0ZazKbZ6MeedqO7RGntRgUp53fRL6kV9hVbqNrxHosyv1TO5yHokAS16PUg7LTCTFF7l7wLlJrTi7tmp80zNLmK/iK3g3HJHjSoQ6FU6mBwMMqXRRUCn6bgaNrSAbYlMUUe9WLrCyp1tFcVC8qQugfDnu/PpBNjWAG/VvmkUDasa4655L7KXXTUGcqk0O/9V/3dtD18GQlcFRQ2aNa5NKBCzpTT/IRWhes4Y7e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MS-Exchange-CrossTenant-AuthSource: SEZPR02MB7967.apcprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Dec 2024 08:28:55.0819 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f1905eb1-c353-41c5-9516-62b4a54b5ee6 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: fGHzSOnpYGKYTOiYf4SRo4tuyWqS3bAz6ZiBZCKLHc/KbXIsXvjWOYQTGCdymR/JlF1aELRuOdzEIWw9aRwEuw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: TYUPR02MB6251 X-Headers-End: 1tKvc7-0006Ls-Kc Subject: [f2fs-dev] [PATCH 2/2] f2fs-tools: add HAVE_PREAD and HAVE_PWRITE X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: LongPing Wei via Linux-f2fs-devel From: LongPing Wei Reply-To: LongPing Wei Cc: panglu2022@gmail.com, LongPing Wei , linux-f2fs-devel@lists.sourceforge.net Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net This patch enable pread and pwrite on Android platform. Signed-off-by: LongPing Wei --- include/android_config.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/android_config.h b/include/android_config.h index f5cd4de..b11e2e4 100644 --- a/include/android_config.h +++ b/include/android_config.h @@ -36,6 +36,8 @@ #define HAVE_FSTAT64 1 #define HAVE_GETMNTENT 1 #define HAVE_MEMSET 1 +#define HAVE_PREAD 1 +#define HAVE_PWRITE 1 #define HAVE_SELINUX_ANDROID_H 1 #define HAVE_SETMNTENT 1 #define HAVE_SPARSE_SPARSE_H 1