{"id":2218972,"url":"http://patchwork.ozlabs.org/api/patches/2218972/?format=json","web_url":"http://patchwork.ozlabs.org/project/ltp/patch/20260402081258.3239096-1-somadas1@linux.ibm.com/","project":{"id":59,"url":"http://patchwork.ozlabs.org/api/projects/59/?format=json","name":"Linux Test Project development","link_name":"ltp","list_id":"ltp.lists.linux.it","list_email":"ltp@lists.linux.it","web_url":"","scm_url":"","webscm_url":"","list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20260402081258.3239096-1-somadas1@linux.ibm.com>","list_archive_url":null,"date":"2026-04-02T08:12:58","name":"zram: skip exfat on systems with large page size","commit_ref":null,"pull_url":null,"state":"needs-review-ack","archived":false,"hash":"4228b03f45b15ebd364e2616e42dc768af17cfc1","submitter":{"id":93035,"url":"http://patchwork.ozlabs.org/api/people/93035/?format=json","name":"Soma Das","email":"somadas1@linux.ibm.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/ltp/patch/20260402081258.3239096-1-somadas1@linux.ibm.com/mbox/","series":[{"id":498447,"url":"http://patchwork.ozlabs.org/api/series/498447/?format=json","web_url":"http://patchwork.ozlabs.org/project/ltp/list/?series=498447","date":"2026-04-02T08:12:58","name":"zram: skip exfat on systems with large page size","version":1,"mbox":"http://patchwork.ozlabs.org/series/498447/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2218972/comments/","check":"warning","checks":"http://patchwork.ozlabs.org/api/patches/2218972/checks/","tags":{},"related":[],"headers":{"Return-Path":"<ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it>","X-Original-To":["incoming@patchwork.ozlabs.org","ltp@lists.linux.it"],"Delivered-To":["patchwork-incoming@legolas.ozlabs.org","ltp@picard.linux.it"],"Authentication-Results":["legolas.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n unprotected) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256\n header.s=pp1 header.b=qwSm3UOZ;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it\n (client-ip=2001:1418:10:5::2; helo=picard.linux.it;\n envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it;\n receiver=patchwork.ozlabs.org)"],"Received":["from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fmYs7453Sz1yFv\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 02 Apr 2026 18:49:12 +1100 (AEDT)","from picard.linux.it (localhost [IPv6:::1])\n\tby picard.linux.it (Postfix) with ESMTP id 5B70E3E2185\n\tfor <incoming@patchwork.ozlabs.org>; Thu,  2 Apr 2026 09:49:10 +0200 (CEST)","from in-4.smtp.seeweb.it (in-4.smtp.seeweb.it\n [IPv6:2001:4b78:1:20::4])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature ECDSA (secp384r1))\n (No client certificate requested)\n by picard.linux.it (Postfix) with ESMTPS id 015223E2185\n for <ltp@lists.linux.it>; Thu,  2 Apr 2026 09:49:06 +0200 (CEST)","from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com\n [148.163.158.5])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by in-4.smtp.seeweb.it (Postfix) with ESMTPS id EFE191000D41\n for <ltp@lists.linux.it>; Thu,  2 Apr 2026 09:49:05 +0200 (CEST)","from pps.filterd (m0353725.ppops.net [127.0.0.1])\n by mx0a-001b2d01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id\n 631HeX713127127\n for <ltp@lists.linux.it>; Thu, 2 Apr 2026 07:49:04 GMT","from ppma22.wdc07v.mail.ibm.com\n (5c.69.3da9.ip4.static.sl-reverse.com [169.61.105.92])\n by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4d65dck098-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT)\n for <ltp@lists.linux.it>; Thu, 02 Apr 2026 07:49:03 +0000 (GMT)","from pps.filterd (ppma22.wdc07v.mail.ibm.com [127.0.0.1])\n by ppma22.wdc07v.mail.ibm.com (8.18.1.2/8.18.1.2) with ESMTP id\n 63258D5p005910\n for <ltp@lists.linux.it>; Thu, 2 Apr 2026 07:49:03 GMT","from smtprelay05.dal12v.mail.ibm.com ([172.16.1.7])\n by ppma22.wdc07v.mail.ibm.com (PPS) with ESMTPS id 4d6spy99d0-1\n (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT)\n for <ltp@lists.linux.it>; Thu, 02 Apr 2026 07:49:03 +0000","from smtpav01.wdc07v.mail.ibm.com (smtpav01.wdc07v.mail.ibm.com\n [10.39.53.228])\n by smtprelay05.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id\n 6327n1FS27394722\n (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);\n Thu, 2 Apr 2026 07:49:02 GMT","from smtpav01.wdc07v.mail.ibm.com (unknown [127.0.0.1])\n by IMSVA (Postfix) with ESMTP id AE4FD58059;\n Thu,  2 Apr 2026 07:49:01 +0000 (GMT)","from smtpav01.wdc07v.mail.ibm.com (unknown [127.0.0.1])\n by IMSVA (Postfix) with ESMTP id 6302C58065;\n Thu,  2 Apr 2026 07:49:01 +0000 (GMT)","from ktes.isst.tadn.ibm.com (unknown [9.5.15.16])\n by smtpav01.wdc07v.mail.ibm.com (Postfix) with ESMTP;\n Thu,  2 Apr 2026 07:49:01 +0000 (GMT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc\n :content-transfer-encoding:date:from:message-id:mime-version\n :subject:to; s=pp1; bh=vz7XediQrIRoCTWiR4kqYtF8Nim8lpTZE6PhnwzIN\n sE=; b=qwSm3UOZn50D741nnia3G2Qe877wJUXDLMLBjTQjJV96X4zOv/eO+CL2p\n qD88CnCA4GyJjXHFnwvsJJG/byxYns2VyLDQOJbiUEoPydEK9jYEZ+xsosaVIJul\n Im/y2/a9deDlLgPT6SzDyWih9YvkSN4xO2Q9EXCE5amBiXQpE6xWdfs358WQoLXv\n c8nzAPJMkUtsVn8dPpTQn/ksGamL7lrJYTI4dNDt3pYA6VajMVrbMwxNeaxEPpX2\n jlekGQ2p0Zq9Tja2LlT12ywM9sEGxUVStUoVXbl5gXtoHvCFVnMHyzQeSAnXcr2M\n p22l8HrruIDM4wcN4RNNmtZCgfM6g==","From":"Soma Das <somadas1@linux.ibm.com>","To":"ltp@lists.linux.it","Date":"Thu,  2 Apr 2026 08:12:58 +0000","Message-Id":"<20260402081258.3239096-1-somadas1@linux.ibm.com>","X-Mailer":"git-send-email 2.39.1","MIME-Version":"1.0","X-TM-AS-GCONF":"00","X-Authority-Analysis":"v=2.4 cv=RsjI7SmK c=1 sm=1 tr=0 ts=69ce1f6f cx=c_pps\n a=5BHTudwdYE3Te8bg5FgnPg==:117 a=5BHTudwdYE3Te8bg5FgnPg==:17\n a=A5OVakUREuEA:10 a=VkNPw1HP01LnGYTKEx00:22 a=RnoormkPH1_aCDwRdu11:22\n a=V8glGbnc2Ofi9Qvn3v5h:22 a=VnNF1IyMAAAA:8 a=Z9b-flewM4-o50iZjQYA:9","X-Proofpoint-GUID":"8RLiUODZdhkcAf5NFEV0vWO6b6NQzUwu","X-Proofpoint-Spam-Details-Enc":"AW1haW4tMjYwNDAyMDA2OCBTYWx0ZWRfX1faYDoN3zW2x\n b8dPe6uTYdM1bvDWxe+O8OJse5obSwcWVWaL9uJmhV8LKCN1wjwoOPVY9jjHTif3+rgdBVr1LOt\n KxwlVHxKRRDSrvtnbyLqh1JP3lUP0dzGDbx7iPJ4Wp6lTqbDq74W2jmD6GjG7ibL3nlo3AxfRLd\n 39sdWsd1CF2WUqqgfqILhFd+IiP7BG/h5PtilUZeZF/2OegCE76zBdR6Pb0DbOTYjU143ukOlln\n n5QvZWOw8nU3ffXnuVM1Dw86WmRIWeJU+mvEWQSyPPF7i+hKCzF6cnBQoA4VD/VnbgjQ5Zwc7sf\n 4VTS5MyIgP0316zXujrTpVjh+Wpe8ybuuMNhRYtufKYxqhY+LMdjisGHy3IHHyV+TF1owg1bt7R\n nss84WbyWaOa+MM5uY/UR4o3ucfwOGA67lah/inioZgIajrsPca/pMsDiuuen7Wf4uFRJDxMPd3\n +DSDGAUu/6jbJSLgHOA==","X-Proofpoint-ORIG-GUID":"8RLiUODZdhkcAf5NFEV0vWO6b6NQzUwu","X-Proofpoint-Virus-Version":"vendor=baseguard\n engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49\n definitions=2026-04-02_01,2026-04-02_01,2025-10-01_01","X-Proofpoint-Spam-Details":"rule=outbound_notspam policy=outbound score=0\n impostorscore=0 bulkscore=0 priorityscore=1501 lowpriorityscore=0\n suspectscore=0 malwarescore=0 spamscore=0 clxscore=1011 phishscore=0\n adultscore=0 classifier=typeunknown authscore=0 authtc= authcc=\n route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2603050001\n definitions=main-2604020068","X-Spam-Status":"No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID,\n SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=disabled version=4.0.1","X-Spam-Checker-Version":"SpamAssassin 4.0.1 (2024-03-25) on in-4.smtp.seeweb.it","X-Virus-Scanned":"clamav-milter 1.0.9 at in-4.smtp.seeweb.it","X-Virus-Status":"Clean","Subject":"[LTP] [PATCH] zram: skip exfat on systems with large page size","X-BeenThere":"ltp@lists.linux.it","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"Linux Test Project <ltp.lists.linux.it>","List-Unsubscribe":"<https://lists.linux.it/options/ltp>,\n <mailto:ltp-request@lists.linux.it?subject=unsubscribe>","List-Archive":"<http://lists.linux.it/pipermail/ltp/>","List-Post":"<mailto:ltp@lists.linux.it>","List-Help":"<mailto:ltp-request@lists.linux.it?subject=help>","List-Subscribe":"<https://lists.linux.it/listinfo/ltp>,\n <mailto:ltp-request@lists.linux.it?subject=subscribe>","Cc":"somadas1@linux.ibm.com","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it","Sender":"\"ltp\" <ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it>"},"content":"exfat requires cluster size >= sector size, but defaults to 4KB.\nOn systems with large page sizes (e.g., 64KB on POWER),\nzram uses page size as sector size, causing mkfs.exfat to fail.\n\nSkip exfat filesystem creation when page size > 4096 to avoid test failure.\n\nSigned-off-by: Soma Das <somadas1@linux.ibm.com>\n---\n .../kernel/device-drivers/zram/zram01.sh      | 91 +++++++++++++++++++\n 1 file changed, 91 insertions(+)","diff":"diff --git a/testcases/kernel/device-drivers/zram/zram01.sh b/testcases/kernel/device-drivers/zram/zram01.sh\nindex 793f6603c..6afba21f0 100755\n--- a/testcases/kernel/device-drivers/zram/zram01.sh\n+++ b/testcases/kernel/device-drivers/zram/zram01.sh\n@@ -11,6 +11,10 @@ TST_TESTFUNC=\"do_test\"\n TST_NEEDS_CMDS=\"awk bc dd\"\n TST_SETUP=\"setup\"\n \n+# Track devices that were skipped due to sector size incompatibility\n+# Format: space-separated list of device numbers (e.g., \"2 5\" if zram2 and zram5 were skipped)\n+skipped_devices=\"\"\n+\n check_space_for_fs()\n {\n \tlocal fs=\"$1\"\n@@ -72,15 +76,59 @@ setup()\n \tzram_load\n }\n \n+check_fs_sector_support()\n+{\n+\tlocal fs=\"$1\"\n+\tlocal dev=\"$2\"\n+\tlocal page_size\n+\tlocal sector_size\n+\n+\t# Get the system page size - zram uses this as sector size\n+\tpage_size=$(getconf PAGE_SIZE 2>/dev/null)\n+\t\n+\tif [ -z \"$page_size\" ] || [ \"$page_size\" -lt 4096 ]; then\n+\t\t# Default to 4KB if we can't determine page size\n+\t\tpage_size=4096\n+\tfi\n+\n+\ttst_res TINFO \"check_fs_sector_support: $fs on zram$dev system_page_size=$page_size\"\n+\n+\t# CHECK: exfat requires cluster size >= sector size, but defaults to 4KB\n+\t# On systems with large page sizes (e.g., 64KB on POWER), sector size > 4KB\n+\t# This causes exfat filesystem creation to fail, so we skip it with TCONF\n+\tif [ \"$fs\" = \"exfat\" ] && [ \"$page_size\" -gt 4096 ]; then\n+\t\ttst_res TINFO \"check_fs_sector_support: $fs on zram$dev has page_size=$page_size (> 4096), skipping\"\n+\t\treturn 1  # Return failure (skip this filesystem)\n+\tfi\n+\n+\treturn 0  # All other filesystems pass this check\n+}\n+\n zram_makefs()\n {\n \tlocal i=$dev_start\n \tlocal fs\n+\tlocal sector_size\n \n+\t# Loop through each filesystem assigned to each zram device\n \tfor fs in $zram_filesystems; do\n+\t\ttst_res TINFO \"zram_makefs: checking device zram$i for filesystem $fs\"\n+\t\t\n+\t\t# Check if this filesystem is compatible with the device's sector size\n+\t\tif ! check_fs_sector_support \"$fs\" \"$i\"; then\n+\t\t\t# Filesystem not supported on this device - mark device as skipped\n+\t\t\tsector_size=$(cat /sys/block/zram${i}/queue/logical_block_size)\n+\t\t\ttst_res TCONF \"mkfs.$fs does not support sector size $sector_size\"\n+\t\t\tskipped_devices=\"$skipped_devices $i\"  # Add to skipped list\n+\t\t\ti=$(($i + 1))\n+\t\t\tcontinue  # Skip to next filesystem\n+\t\tfi\n+\n+\t\t# Filesystem is supported - attempt to create it\n \t\ttst_res TINFO \"make $fs filesystem on /dev/zram$i\"\n \t\tmkfs.$fs /dev/zram$i > err.log 2>&1\n \t\tif [ $? -ne 0 ]; then\n+\t\t\t# Filesystem creation failed\n \t\t\tcat err.log\n \t\t\ttst_res TFAIL \"Failed to make $fs on /dev/zram$i\"\n \t\t\ttst_brk TBROK \"Can't continue with mounting the FS\"\n@@ -95,8 +143,27 @@ zram_makefs()\n zram_mount()\n {\n \tlocal i\n+\tlocal skip\n \n+\t# Attempt to mount all zram devices\n \tfor i in $(seq $dev_start $dev_end); do\n+\t\tskip=0\n+\t\t\n+\t\t# Check if this device was marked as skipped during filesystem creation\n+\t\tfor dev in $skipped_devices; do\n+\t\t\tif [ \"$dev\" = \"$i\" ]; then\n+\t\t\t\tskip=1\n+\t\t\t\tbreak\n+\t\t\tfi\n+\t\tdone\n+\n+\t\t# Skip mounting devices that don't have filesystems\n+\t\tif [ $skip -eq 1 ]; then\n+\t\t\ttst_res TINFO \"skipping mount of /dev/zram$i (filesystem not created)\"\n+\t\t\tcontinue\n+\t\tfi\n+\n+\t\t# Mount the filesystem that was created in zram_makefs\n \t\ttst_res TINFO \"mount /dev/zram$i\"\n \t\tmkdir zram$i\n \t\tROD mount /dev/zram$i zram$i\n@@ -130,8 +197,27 @@ zram_fill_fs()\n {\n \tlocal mem_used_total\n \tlocal b i r v\n+\tlocal skip\n \n+\t# Fill each mounted filesystem with data to test compression\n \tfor i in $(seq $dev_start $dev_end); do\n+\t\tskip=0\n+\t\t\n+\t\t# Check if this device was marked as skipped (has no filesystem)\n+\t\tfor dev in $skipped_devices; do\n+\t\t\tif [ \"$dev\" = \"$i\" ]; then\n+\t\t\t\tskip=1\n+\t\t\t\tbreak\n+\t\t\tfi\n+\t\tdone\n+\n+\t\t# Skip filling devices that don't have filesystems\n+\t\tif [ $skip -eq 1 ]; then\n+\t\t\ttst_res TINFO \"skipping fill of zram$i (filesystem not created)\"\n+\t\t\tcontinue\n+\t\tfi\n+\n+\t\t# Fill this zram device with zeros to test compression ratio\n \t\ttst_res TINFO \"filling zram$i (it can take long time)\"\n \t\tb=0\n \t\twhile true; do\n@@ -140,12 +226,15 @@ zram_fill_fs()\n \t\t\t\t>/dev/null 2>err.txt || break\n \t\t\tb=$(($b + 1))\n \t\tdone\n+\t\t\n+\t\t# Verify that at least some data was written\n \t\tif [ $b -eq 0 ]; then\n \t\t\t[ -s err.txt ] && tst_res TWARN \"dd error: $(cat err.txt)\"\n \t\t\ttst_brk TBROK \"cannot fill zram $i\"\n \t\tfi\n \t\ttst_res TPASS \"zram$i was filled with '$b' KB\"\n \n+\t\t# Check if compression statistics are available (requires mm_stat)\n \t\tif [ ! -f \"/sys/block/zram$i/mm_stat\" ]; then\n \t\t\tif [ $i -eq 0 ]; then\n \t\t\t\ttst_res TCONF \"zram compression ratio test requires zram mm_stat sysfs file\"\n@@ -154,6 +243,7 @@ zram_fill_fs()\n \t\t\tcontinue\n \t\tfi\n \n+\t\t# Read and verify the compression ratio\n \t\tTST_RETRY_FN_EXP_BACKOFF \"check_read_mem_used_total /sys/block/zram$i/mm_stat\" 0 10\n \t\tmem_used_total=$(read_mem_used_total /sys/block/zram$i/mm_stat)\n \t\ttst_res TINFO \"mem_used_total: $mem_used_total\"\n@@ -161,6 +251,7 @@ zram_fill_fs()\n \t\tv=$((100 * 1024 * $b / $mem_used_total))\n \t\tr=$(echo \"scale=2; $v / 100 \" | bc)\n \n+\t\t# Fail if compression ratio is less than 1:1 (data grew instead of compressed)\n \t\tif [ \"$v\" -lt 100 ]; then\n \t\t\ttst_res TFAIL \"compression ratio: $r:1\"\n \t\t\tbreak\n","prefixes":[]}