From nobody Sun Feb 8 03:57:11 2026 Received: from mail-pf1-f171.google.com (mail-pf1-f171.google.com [209.85.210.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 52C8E33A714 for ; Fri, 19 Dec 2025 18:06:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.171 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766167602; cv=none; b=bovMx+xQugehjM+QV6KVpRo4PbhuLOFeqc6W/Wng+kIUHCjBl7ob3oZ+yezsjeAfBI621TdemMYtDBB8xZa6UYmWJU+aucq0zsQmp/n7nRVE35+nZVYq1OMuA4xREbT96xsxrN3O5ZqHsz29wu4zKqqZ8REC8PF7PFqTMOY84ao= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766167602; c=relaxed/simple; bh=RmCnd6gkVlTZlugAcfM3670Kr8ZwNknI/MToBJWnUBw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=M1UNlkOBq7XUIMJcJKiIIsQRYKLPf4uZUCW9h7B3+r1SINgc42RGKnCryyWFrxvCqKRUBs/oVIPSZ71RC3LSOHYDzRXFYH4HFYxZJsJ6840PL2IvihYpbLs2RVXIN8BvIUf9KuvFBaV6qKkYv0TOfGRxdWHQKSaNZ1zdYW59dtk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=ZpFy2ifd; arc=none smtp.client-ip=209.85.210.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="ZpFy2ifd" Received: by mail-pf1-f171.google.com with SMTP id d2e1a72fcca58-7aab061e7cbso2927618b3a.1 for ; Fri, 19 Dec 2025 10:06:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1766167599; x=1766772399; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=dW3bXX4vP+WteeSK3ew02UmI9wiau0xdWqe/ZXK117U=; b=ZpFy2ifd83Eym1irHxEJi4ORn+/+ueWx6zfrtGVXsyJSXnWiLyzx5s6ZBNpjGaYfUh 18PCM7+6dS6lvHTk0gDH3006xXlVQLATp1Ans4pIqlCwq+MUH3V8QyEiZo0Kv/+nbGPH OCARGNx0VvgQmSYklJqRXS0+cHtRmXOYQrYs82eMCQKnD5fTqhCEBTye9FsIlwQVch4Z xisz+XVeWXURb3jUnXYV1ENYYN6gfXwxPuV2VH5wf2OakfphEDd2Q9d2y8ipPIZh4FxG C773FlBc65H03OiChnCeob0crVbVael65dZr7kfiyJM9XDhKtyqy1QgAY+zq43o0Jo2W KmwQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766167599; x=1766772399; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=dW3bXX4vP+WteeSK3ew02UmI9wiau0xdWqe/ZXK117U=; b=bVc3YdPX5/Xy4jlKFEOZaYh+x6Cv/WCN1m3abUWrpgPSVRfMF/LWmo9xKNMGnfXF48 L0EckSWY+gblVwREK59znf0oYfvSsAbo6SsfiOT+w6ZFuglL/iqUi9+KEZZxTB8e4V++ EMggK9MXN96A7FAC0OswWYKQMZ5hMjuJ16GAXQn17aC+FaemeSPidTNxacbkTaCfoWKg WEsYfjf+g8hVxyHmCUBMymhpOPodilUW+Wfl7U9HnIZE8YOr/01vJmyPDPxlitIZ0l2G vwUoKJ/KG3G5bcXo25uHW+5N+NZTtkpEZMh3EtlaL7y1K2dkMk26hg541YkbjYI+E8pU pveg== X-Forwarded-Encrypted: i=1; AJvYcCXhPb7EkhPLUyjiHiwpY87ZSrPlVkce35pYuRXxQkMLYDFXR1NSnFZHUF6wNdjs5R0frskEgZvz/O+1hRI=@vger.kernel.org X-Gm-Message-State: AOJu0YxiC72aT1pyDSfsz6oNlRdNF5yuM80XCmwDa+enn+llxAxivkq4 daiHe2mMwF6ZwZKjjQ5MWgnTM89Bb5jc9IvyDzS+7JZONdsQU4Jyr0Od X-Gm-Gg: AY/fxX6fukSrdnXSSdg7rIrhaWUrFWdcYpHX3U5hJN2yHhEgdmxJM9u33eqgkQGNCd7 mB5HbHRqGirXTekBGMA/GSmeb32auhaxEaMwjJEGbTHPay0XBVLxLUtJaWpbbyUyqor9H9ZuTHL JvLX5ygDy0oabMe7Wm2gbRHUdQoRurwi61tJDtE9n5iudyXFDupy/RyNfUnTLe4UwIuDeiAs8Jn kAzifuXbm+GXwA/aKCtTiZFf0RXfGtpzIAgi7d4XlvSMZ5PLlS25oUg8tUPyXGgp5PuvVcJg2wH hjgdGkbk8Vvl+dCe9BN00gdhXChC5SNW9NrTb27ZLWTcKGtlW4kETnRDW/giD6WI6DgPHrE7kia 8gFrKqVhvev8E0jAbia7+NMYb1Vmu3ebI5eT6OZljSeHDRP3fM81+xGAT4Sa3yvZAg3q90h6ZzT EPiY6kvL6YHW44LjA9B8Ko89zoRcTrJPkkoi7KtkehEw8EQJMqYdcuXcahZxjyHbA1fEYfX+s= X-Google-Smtp-Source: AGHT+IGe/PQZJEf5gTpe3Qj3z8NAvg1R45BbPbrsdavVKhN2FFhW7JZT5OmWh7zVxEj1sac9wjAXyA== X-Received: by 2002:a05:6a20:3d06:b0:35f:c643:105e with SMTP id adf61e73a8af0-376a81dc6e1mr3504223637.34.1766167598563; Fri, 19 Dec 2025 10:06:38 -0800 (PST) Received: from carrot.devel.local (i114-180-53-102.s42.a014.ap.plala.or.jp. [114.180.53.102]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-c1e7961c130sm2688468a12.3.2025.12.19.10.06.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Dec 2025 10:06:37 -0800 (PST) From: Ryusuke Konishi To: Viacheslav Dubeyko Cc: linux-nilfs , LKML Subject: [PATCH 1/3] nilfs2: Fix potential block overflow that cause system hang Date: Sat, 20 Dec 2025 03:04:25 +0900 Message-ID: <20251219180631.27554-2-konishi.ryusuke@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251219180631.27554-1-konishi.ryusuke@gmail.com> References: <20251219180631.27554-1-konishi.ryusuke@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Edward Adam Davis When a user executes the FITRIM command, an underflow can occur when calculating nblocks if end_block is too small. Since nblocks is of type sector_t, which is u64, a negative nblocks value will become a very large positive integer. This ultimately leads to the block layer function __blkdev_issue_discard() taking an excessively long time to process the bio chain, and the ns_segctor_sem lock remains held for a long period. This prevents other tasks from acquiring the ns_segctor_sem lock, resulting in the hang reported by syzbot in [1]. If the ending block is too small, typically if it is smaller than 4KiB range, depending on the usage of the segment 0, it may be possible to attempt a discard request beyond the device size causing the hang. Exiting successfully and assign the discarded size (0 in this case) to range->len. Although the start and len values in the user input range are too small, a conservative strategy is adopted here to safely ignore them, which is equivalent to a no-op; it will not perform any trimming and will not throw an error. [1] task:segctord state:D stack:28968 pid:6093 tgid:6093 ppid:2 task_flags:0x2= 00040 flags:0x00080000 Call Trace: rwbase_write_lock+0x3dd/0x750 kernel/locking/rwbase_rt.c:272 nilfs_transaction_lock+0x253/0x4c0 fs/nilfs2/segment.c:357 nilfs_segctor_thread_construct fs/nilfs2/segment.c:2569 [inline] nilfs_segctor_thread+0x6ec/0xe00 fs/nilfs2/segment.c:2684 [ryusuke: corrected part of the commit message about the consequences] Fixes: 82e11e857be3 ("nilfs2: add nilfs_sufile_trim_fs to trim clean segs") Reported-by: syzbot+7eedce5eb281acd832f0@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=3D7eedce5eb281acd832f0 Signed-off-by: Edward Adam Davis Signed-off-by: Ryusuke Konishi Cc: stable@vger.kernel.org --- fs/nilfs2/sufile.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fs/nilfs2/sufile.c b/fs/nilfs2/sufile.c index 83f93337c01b..eceedca02697 100644 --- a/fs/nilfs2/sufile.c +++ b/fs/nilfs2/sufile.c @@ -1093,6 +1093,9 @@ int nilfs_sufile_trim_fs(struct inode *sufile, struct= fstrim_range *range) else end_block =3D start_block + len - 1; =20 + if (end_block < nilfs->ns_first_data_block) + goto out; + segnum =3D nilfs_get_segnum_of_block(nilfs, start_block); segnum_end =3D nilfs_get_segnum_of_block(nilfs, end_block); =20 @@ -1191,6 +1194,7 @@ int nilfs_sufile_trim_fs(struct inode *sufile, struct= fstrim_range *range) out_sem: up_read(&NILFS_MDT(sufile)->mi_sem); =20 +out: range->len =3D ndiscarded << nilfs->ns_blocksize_bits; return ret; } --=20 2.43.0 From nobody Sun Feb 8 03:57:11 2026 Received: from mail-pj1-f50.google.com (mail-pj1-f50.google.com [209.85.216.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BC13F33BBC0 for ; Fri, 19 Dec 2025 18:06:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.50 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766167605; cv=none; b=MsD2EX9cOh7O1Dbw0snXKHwhUFnYEy1SQzqQSNIqJALcnVB6SZyAUnjX7v0OnEP+h37h90gdxKYAOjlfYMOjSsZz+TdEtllLnH+mzUIqSsatjxYOaRAiCxfV7RJjo27DX+0OS87cI0qQw3Y01RLolbIba3fzkLPb1OtYdUmv41I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766167605; c=relaxed/simple; bh=SR3AaqbdMw9Oe2F4eEbEQZNViyFTD4hfWmMV0M9Qnk4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Zv7mEWuUbMlEMBap46w57nrP4HCkIY0CrykUf7it2drNHxOOyCg3ck39d/eeeyK3zmDesd9RcdQIW1zzOzKdVZVlGvWuz/ncUnfsUwk3n7yTMQv2nWf885gc1KUCsUwK7E6xm8NWu1upLW0Mcf5En78/B6wnN4G6mRPGKf+6NoA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=RXVmCEQL; arc=none smtp.client-ip=209.85.216.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="RXVmCEQL" Received: by mail-pj1-f50.google.com with SMTP id 98e67ed59e1d1-34c708702dfso2229496a91.1 for ; Fri, 19 Dec 2025 10:06:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1766167601; x=1766772401; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=/76w433R6TTdeqL6SJFFWW2G8zOz6+MYiB5WjeQWsdk=; b=RXVmCEQLDiFhSShWtCAMAK/N5Kg+vxTLz78ochpDYvQwe+s6que4w+5vZlLVfuFK7N pQZzADH5yqJJL9Brsfw/FBbSkUiUkvg+viB7/TklYNBzS+Y8zMZ55YdXzlHnVb/DYdLF 11oUM34D/h/EuuZFMwmzxzQ+SeQbi3q7NbEMNZ8eobC4IdPqhTrHSViOsGpG7HXF/V7O fwO2v6KH6ibjvsiFwjynAi57sQ7YnQof7Nyi5ARvYHvQgF0pDNQwM59J1DVDjnxByqCj NIgzRx8D7kY0iAFaYuoEADSukoK0vt2x61B0J04Zx+JJ1mBaCRFmUvGDltDZy/0iR9Sm tG4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766167601; x=1766772401; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=/76w433R6TTdeqL6SJFFWW2G8zOz6+MYiB5WjeQWsdk=; b=gveDq7l5VzoUjbc0jrUbtSPZk1awWZ3Vzqwcm4SrIM0buS58OWEQAJUA6eUDD3mcuO Xo+4M5IVDenHq1x4MN3ej9EhttLz05OJxp55x7e+J5d4VkPKQhDsQPuEIRa5ZZ9zp85W 4gWSOMboGKq9i3elxxxo76wUaJZYwxWMckPT8+nKZyvqXGM/UTFQt3ci0OfYLP3gW9R4 Y1JHCDiivTGSLDgjgrwWT2QZYsHHicztQEpxc4LG5B9VJqHpOaNWsKcy8ka7mTfOHKl4 SibKoZIj0SGsg0X2mlioBTfCj1Q2viceBdTbe5Czfp+VcMkBepamvT/BazkggZaYNpfK zhsA== X-Forwarded-Encrypted: i=1; AJvYcCWqXnzhyK+MmNmy7m4r156oZowG0dQm8dCJYZRosyDf9Ube/b/9XsXywUlpafk8MO9Dp7RxSrz5U9Uqj5Q=@vger.kernel.org X-Gm-Message-State: AOJu0Yxz9DGxq/KNaenO5ogy/MecBXmQR0+XslToqaSS6QixZC/RFgE6 KGX5qy3nHXb+DX8BA4U1eWGAUKWy76bbEz63tGq8MyKEVk9UBdSmohrQrQzgBttH X-Gm-Gg: AY/fxX6LiQi4ZpHjIAGyZDStdvKac6D0uD9WOMvQlN3zMhLwNsg7+NyT+8I5Zwcr9ev jrEg8jXbd0sccxMa+lpMoWfDNjOJ2GZk/q1I17EW5WksQ3lgcedcfksNgZjXFbjtvAocvAEHi6S IeF7jpEAPcPggtuQTIzAKSjA3dKWhbJVRxZYt+NpuRTaLrt26dGBV+BWemJ4ZSRUVXywJufum6z WCuReNY4VQw0iUwrNi2yjhzZjPpgqLcWknTNlPR6p3TF17N6DupcRXDt9URjXEyzWbrx7J8bcyf Rb/5ePvlK2r68LIdKdJDzr+YvZE7wJFJFle2EZU+1iXjRgjMEHccJGV5GN++T3DCZTABncqmo4P SnYmHyMU+WR2BCZQ7+utPZPmURC22k3mpDeVmziUUVZLcb3jRvCfpLu6rh0aOrXKHBllDihVtXk j4pO/+gJqc+2kJe9tABNIMJbpxSpSfKxrqh6Mk+A54I/NTkD22NFWCKpQxyIvCdO6h9dI2ATA= X-Google-Smtp-Source: AGHT+IFyz+71OiXiENLpaiOnaXfX5sdTj+ajSAtQB4Aj+7kXJEQr4WS2il7euZ5aYW6uka/XKtRHvQ== X-Received: by 2002:a17:90b:560d:b0:343:e461:9022 with SMTP id 98e67ed59e1d1-34e921a3caamr3277447a91.24.1766167600961; Fri, 19 Dec 2025 10:06:40 -0800 (PST) Received: from carrot.devel.local (i114-180-53-102.s42.a014.ap.plala.or.jp. [114.180.53.102]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-c1e7961c130sm2688468a12.3.2025.12.19.10.06.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Dec 2025 10:06:39 -0800 (PST) From: Ryusuke Konishi To: Viacheslav Dubeyko Cc: linux-nilfs , LKML Subject: [PATCH 2/3] nilfs2: convert nilfs_super_block to kernel-doc Date: Sat, 20 Dec 2025 03:04:26 +0900 Message-ID: <20251219180631.27554-3-konishi.ryusuke@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251219180631.27554-1-konishi.ryusuke@gmail.com> References: <20251219180631.27554-1-konishi.ryusuke@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Randy Dunlap Eliminate 40+ kernel-doc warnings in nilfs2_ondisk.h by converting all of the struct member comments to kernel-doc comments. Fix one misnamed struct member in nilfs_direct_node. Object files before and after are the same size and content. Examples of warnings: Warning: include/uapi/linux/nilfs2_ondisk.h:202 struct member 's_rev_level' not described in 'nilfs_super_block' Warning: include/uapi/linux/nilfs2_ondisk.h:202 struct member 's_minor_rev_level' not described in 'nilfs_super_block' Warning: include/uapi/linux/nilfs2_ondisk.h:202 struct member 's_magic' not described in 'nilfs_super_block' Warning: include/uapi/linux/nilfs2_ondisk.h:202 struct member 's_bytes' not described in 'nilfs_super_block' Warning: include/uapi/linux/nilfs2_ondisk.h:202 struct member 's_flags' not described in 'nilfs_super_block' Signed-off-by: Randy Dunlap Signed-off-by: Ryusuke Konishi --- include/uapi/linux/nilfs2_ondisk.h | 163 +++++++++++++++++------------ 1 file changed, 97 insertions(+), 66 deletions(-) diff --git a/include/uapi/linux/nilfs2_ondisk.h b/include/uapi/linux/nilfs2= _ondisk.h index 3196cc44a002..b3442b16ff6a 100644 --- a/include/uapi/linux/nilfs2_ondisk.h +++ b/include/uapi/linux/nilfs2_ondisk.h @@ -133,73 +133,104 @@ struct nilfs_super_root { =20 /** * struct nilfs_super_block - structure of super block on disk + * @s_rev_level: Revision level + * @s_minor_rev_level: minor revision level + * @s_magic: Magic signature + * @s_bytes: Bytes count of CRC calculation for + * this structure. s_reserved is excluded. + * @s_flags: flags + * @s_crc_seed: Seed value of CRC calculation + * @s_sum: Check sum of super block + * @s_log_block_size: Block size represented as follows: + * blocksize =3D 1 << (s_log_block_size + 10) + * @s_nsegments: Number of segments in filesystem + * @s_dev_size: block device size in bytes + * @s_first_data_block: 1st seg disk block number + * @s_blocks_per_segment: number of blocks per full segment + * @s_r_segments_percentage: Reserved segments percentage + * @s_last_cno: Last checkpoint number + * @s_last_pseg: disk block addr pseg written last + * @s_last_seq: seq. number of seg written last + * @s_free_blocks_count: Free blocks count + * @s_ctime: Creation time (execution time of newfs) + * @s_mtime: Mount time + * @s_wtime: Write time + * @s_mnt_count: Mount count + * @s_max_mnt_count: Maximal mount count + * @s_state: File system state + * @s_errors: Behaviour when detecting errors + * @s_lastcheck: time of last check + * @s_checkinterval: max. time between checks + * @s_creator_os: OS + * @s_def_resuid: Default uid for reserved blocks + * @s_def_resgid: Default gid for reserved blocks + * @s_first_ino: First non-reserved inode + * @s_inode_size: Size of an inode + * @s_dat_entry_size: Size of a dat entry + * @s_checkpoint_size: Size of a checkpoint + * @s_segment_usage_size: Size of a segment usage + * @s_uuid: 128-bit uuid for volume + * @s_volume_name: volume name + * @s_c_interval: Commit interval of segment + * @s_c_block_max: Threshold of data amount for the + * segment construction + * @s_feature_compat: Compatible feature set + * @s_feature_compat_ro: Read-only compatible feature set + * @s_feature_incompat: Incompatible feature set + * @s_reserved: padding to the end of the block */ struct nilfs_super_block { -/*00*/ __le32 s_rev_level; /* Revision level */ - __le16 s_minor_rev_level; /* minor revision level */ - __le16 s_magic; /* Magic signature */ - - __le16 s_bytes; /* - * Bytes count of CRC calculation - * for this structure. s_reserved - * is excluded. - */ - __le16 s_flags; /* flags */ - __le32 s_crc_seed; /* Seed value of CRC calculation */ -/*10*/ __le32 s_sum; /* Check sum of super block */ - - __le32 s_log_block_size; /* - * Block size represented as follows - * blocksize =3D - * 1 << (s_log_block_size + 10) - */ - __le64 s_nsegments; /* Number of segments in filesystem */ -/*20*/ __le64 s_dev_size; /* block device size in bytes */ - __le64 s_first_data_block; /* 1st seg disk block number */ -/*30*/ __le32 s_blocks_per_segment; /* number of blocks per full segmen= t */ - __le32 s_r_segments_percentage; /* Reserved segments percentage */ - - __le64 s_last_cno; /* Last checkpoint number */ -/*40*/ __le64 s_last_pseg; /* disk block addr pseg written last */ - __le64 s_last_seq; /* seq. number of seg written last */ -/*50*/ __le64 s_free_blocks_count; /* Free blocks count */ - - __le64 s_ctime; /* - * Creation time (execution time of - * newfs) - */ -/*60*/ __le64 s_mtime; /* Mount time */ - __le64 s_wtime; /* Write time */ -/*70*/ __le16 s_mnt_count; /* Mount count */ - __le16 s_max_mnt_count; /* Maximal mount count */ - __le16 s_state; /* File system state */ - __le16 s_errors; /* Behaviour when detecting errors */ - __le64 s_lastcheck; /* time of last check */ - -/*80*/ __le32 s_checkinterval; /* max. time between checks */ - __le32 s_creator_os; /* OS */ - __le16 s_def_resuid; /* Default uid for reserved blocks */ - __le16 s_def_resgid; /* Default gid for reserved blocks */ - __le32 s_first_ino; /* First non-reserved inode */ - -/*90*/ __le16 s_inode_size; /* Size of an inode */ - __le16 s_dat_entry_size; /* Size of a dat entry */ - __le16 s_checkpoint_size; /* Size of a checkpoint */ - __le16 s_segment_usage_size; /* Size of a segment usage */ - -/*98*/ __u8 s_uuid[16]; /* 128-bit uuid for volume */ -/*A8*/ char s_volume_name[80] /* volume name */ - __kernel_nonstring; - -/*F8*/ __le32 s_c_interval; /* Commit interval of segment */ - __le32 s_c_block_max; /* - * Threshold of data amount for - * the segment construction - */ -/*100*/ __le64 s_feature_compat; /* Compatible feature set */ - __le64 s_feature_compat_ro; /* Read-only compatible feature set */ - __le64 s_feature_incompat; /* Incompatible feature set */ - __u32 s_reserved[186]; /* padding to the end of the block */ +/*00*/ __le32 s_rev_level; + __le16 s_minor_rev_level; + __le16 s_magic; + + __le16 s_bytes; + __le16 s_flags; + __le32 s_crc_seed; +/*10*/ __le32 s_sum; + + __le32 s_log_block_size; + __le64 s_nsegments; +/*20*/ __le64 s_dev_size; + __le64 s_first_data_block; +/*30*/ __le32 s_blocks_per_segment; + __le32 s_r_segments_percentage; + + __le64 s_last_cno; +/*40*/ __le64 s_last_pseg; + __le64 s_last_seq; +/*50*/ __le64 s_free_blocks_count; + + __le64 s_ctime; +/*60*/ __le64 s_mtime; + __le64 s_wtime; +/*70*/ __le16 s_mnt_count; + __le16 s_max_mnt_count; + __le16 s_state; + __le16 s_errors; + __le64 s_lastcheck; + +/*80*/ __le32 s_checkinterval; + __le32 s_creator_os; + __le16 s_def_resuid; + __le16 s_def_resgid; + __le32 s_first_ino; + +/*90*/ __le16 s_inode_size; + __le16 s_dat_entry_size; + __le16 s_checkpoint_size; + __le16 s_segment_usage_size; + +/*98*/ __u8 s_uuid[16]; +/*A8*/ char s_volume_name[80] __kernel_nonstring; + +/*F8*/ __le32 s_c_interval; + __le32 s_c_block_max; + +/*100*/ __le64 s_feature_compat; + __le64 s_feature_compat_ro; + __le64 s_feature_incompat; + __u32 s_reserved[186]; }; =20 /* @@ -449,7 +480,7 @@ struct nilfs_btree_node { /** * struct nilfs_direct_node - header of built-in bmap array * @dn_flags: flags - * @dn_pad: padding + * @pad: padding */ struct nilfs_direct_node { __u8 dn_flags; --=20 2.43.0 From nobody Sun Feb 8 03:57:11 2026 Received: from mail-pj1-f48.google.com (mail-pj1-f48.google.com [209.85.216.48]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4F54D2DF13E for ; Fri, 19 Dec 2025 18:06:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.48 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766167605; cv=none; b=pTWti+nIWJ3SNkpyhx56jnB/pNZ8jYypemtoZNVWQ3PCwybwh4nMQaxvUFSfGtf5RT107NdA29ji6ssSi9M99bgFBuh7AaEOQzNXMUSYtrsfuF3u8Y7MM4CzwhX/9P45H94+Iq7PrRtd1aeP0EW8LLJfDJZRjrW1e1g+uAnHtrw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1766167605; c=relaxed/simple; bh=6lZg6ilh6tUAkEyDhY8aXtPT8xREk772+NnaNRBlPPk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YpDNSpuC7PPYf47nX6WbmLudtE9MsfyFCjF7HS5gqzzS001WlVBo97qLSIsu6pvgZ2RfnPD5QqH67Po8TYAB7PEOKGx3Ok6MhmiCy/U0XJImofmADJemuqhzpDGdMK16t6i17unNXw+bnefe2vngO0spLCg7LjGdYD2+flGeA0k= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Jzs2pkyl; arc=none smtp.client-ip=209.85.216.48 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Jzs2pkyl" Received: by mail-pj1-f48.google.com with SMTP id 98e67ed59e1d1-34c7d0c5ddaso1173641a91.0 for ; Fri, 19 Dec 2025 10:06:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1766167603; x=1766772403; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=LC3SzuQK4lQaWagpwzAMXcp9OAihVv8YS7EU8JQc+pw=; b=Jzs2pkylblal46UEcZPGanA1e080tiwOH0v4M89qCaQ9TLxR0Kmubiars4zOmXNpL2 UMrEN0K/1x+eMPuwrC0U3q3wbgJNuE9KoXTYrHshXFm8GneannTf6vnYp7VYOwY+/2/r AN0glMhv9H0XiOwq5JCGlEK2J7CO6JEFiEGG9bJ4JP5eoG+t7s3L+BF7qV5t+17QHvzF Ia1b2w0/+g8E52ATLSCYTQ6vOg9UfeLnjGjs+I20CDkz3m28bLKkTT2vegWVoxNiiGYE SPwE2ySavesBvfnQc6oWcwdh6+GfPxJZ6UMEMcJ9V2lcuuUuUpuVSzFQrs+bZVluyJzI Uzxw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1766167604; x=1766772404; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=LC3SzuQK4lQaWagpwzAMXcp9OAihVv8YS7EU8JQc+pw=; b=OxRBANFZqKUE447CZwmJHu+MKmnphjKWWoS9p3QlhY4os04peCNZK6qgMHAx8QvIWO bjI4f4C5JNoIXAvz8cJ8hzjWZC3T7kSQpHZPADyc3H3sQl2H65RsoqbUKhq3vSoheJVv d3GlR7ceiWNbyYj3NA37BTg6VdY/4kqyC6IdlMYXS1xWzhGazUhs6mjqM1NlNrK5RhAq v5Qr0jmpncK4KiA89mObMP7CBo1/40ZyUKNJ8hX4k24oOf33R8W+wjxtGdeOk8mJNrEX lyw6UtkYZc4t4QLRv+J2hvxPR7iAdkzQTmR49l4vN1GixE79FfV0aqE5DCiqArW7UIop nxeg== X-Forwarded-Encrypted: i=1; AJvYcCW4btPU1QMmzJCh4oZm0PmD0J9gY/vHAmn5GAjP5N8mN9lounLJrF0A6zgJUn4R+CDna7Uy8UBfq/wbNx4=@vger.kernel.org X-Gm-Message-State: AOJu0Yxms/QYzn4PYfwX5zTx7H8TditJqhV5cNCd21nggBqNj3TB5jHs 8Nw12PCn321i3ejmOuhKc6qI1SeS6tD62oOAkHnVJZQvzptgafBmo/sfkylCwgrT X-Gm-Gg: AY/fxX70Q0a2u/0xfjv+AFvxPyk+2ThQfMTdirSqFBhr0qlvgqXUV01yUe5JUIAEh/i Jrj3myt6AJ2rPrK7kxdSmxZV4jDKGsCiCQm8TE9El7g5D0fV6x6ADv0YtOUhJ0vPoSGX3aM5yyd 9/jm34qPyMJT4f9PYKElv12shyzybv2zuCrFAirn8GcvOzoGGXSvSJ6orJnmWqwusUgGGF4emwu V7a8Z8gj9v5unRgSx2hmeVZkfkAhzFQ+iV51ZIqDLaDsbiehPL1v2WxGoIF3FQEZfOt0nduQyN3 NynmhDMAsXA/gAo41BlqiwkwdHdARcEsk7kmm2gn9FqfRHJXHosyGwOdKYaxfuQayS0N+Sl67EG zLp7o8BCl8HWAcS9n1DfuOG344JTN7d2OTGD4RomfyYr6VQsgSPNrkgfPDWrkbDh7i4cazS4AfG cdyO8zu9fiXgjrUD41uUbsk7yMLHJlxHIYu1zJp2T/KnbA0Oahfwg3zQ401DdX0hHd3O02LQF78 Zq5DKhm/A== X-Google-Smtp-Source: AGHT+IGrBkGdp0AGHooV/VY4XJYreOLG+FwblAbF4EIFCRaneMj0/aBVxLoryVEqlan0xNesarhTHg== X-Received: by 2002:a17:90b:4a43:b0:34c:2f01:2262 with SMTP id 98e67ed59e1d1-34e71d6961amr6032809a91.3.1766167603465; Fri, 19 Dec 2025 10:06:43 -0800 (PST) Received: from carrot.devel.local (i114-180-53-102.s42.a014.ap.plala.or.jp. [114.180.53.102]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-c1e7961c130sm2688468a12.3.2025.12.19.10.06.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Dec 2025 10:06:42 -0800 (PST) From: Ryusuke Konishi To: Viacheslav Dubeyko Cc: linux-nilfs , LKML Subject: [PATCH 3/3] nilfs2: fix missing struct keywords in nilfs2_api.h kernel-doc Date: Sat, 20 Dec 2025 03:04:27 +0900 Message-ID: <20251219180631.27554-4-konishi.ryusuke@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251219180631.27554-1-konishi.ryusuke@gmail.com> References: <20251219180631.27554-1-konishi.ryusuke@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Eliminate the following kernel-doc warnings in nilfs2_api.h: Warning: include/uapi/linux/nilfs2_api.h:65 cannot understand function prototype: 'struct nilfs_suinfo' Warning: include/uapi/linux/nilfs2_api.h:101 cannot understand function prototype: 'struct nilfs_suinfo_update' This ensures that the documentation for nilfs_suinfo and nilfs_suinfo_update is correctly parsed and generated by adding the missing 'struct' keyword to their kernel-doc comments. Signed-off-by: Ryusuke Konishi --- include/uapi/linux/nilfs2_api.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/uapi/linux/nilfs2_api.h b/include/uapi/linux/nilfs2_ap= i.h index 8b9b89104f3d..d1b6fcde2fb8 100644 --- a/include/uapi/linux/nilfs2_api.h +++ b/include/uapi/linux/nilfs2_api.h @@ -58,7 +58,7 @@ NILFS_CPINFO_FNS(INVALID, invalid) NILFS_CPINFO_FNS(MINOR, minor) =20 /** - * nilfs_suinfo - segment usage information + * struct nilfs_suinfo - segment usage information * @sui_lastmod: timestamp of last modification * @sui_nblocks: number of written blocks in segment * @sui_flags: segment usage flags @@ -93,7 +93,7 @@ static inline int nilfs_suinfo_clean(const struct nilfs_s= uinfo *si) } =20 /** - * nilfs_suinfo_update - segment usage information update + * struct nilfs_suinfo_update - segment usage information update * @sup_segnum: segment number * @sup_flags: flags for which fields are active in sup_sui * @sup_reserved: reserved necessary for alignment --=20 2.43.0