fs: widen ino_t from uint16_t to uint32_t

A 16-bit ino_t can only address 65536 distinct file serial numbers,
which is not enough for filesystems with large directory trees and
breaks portable software (e.g. dropbear's scp) that expects a wider
inode number space.  Widen ino_t (and nuttx_ino_t in the hostfs ABI)
to uint32_t to match common POSIX practice.

Update fs/rpmsgfs/rpmsgfs.h accordingly: promote the 'ino' field in
struct rpmsgfs_stat_priv_s from uint16_t to uint32_t and move 'nlink'
into the trailing 16-bit slot previously occupied by the reserved
field, keeping the overall packed-struct layout/size unchanged.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2026-06-20 21:39:20 +08:00 committed by Matteo Golin
parent fa61c78c78
commit 50377d0909
3 changed files with 4 additions and 5 deletions

View file

@ -122,7 +122,7 @@ typedef intptr_t nuttx_ssize_t;
typedef unsigned int nuttx_gid_t;
typedef unsigned int nuttx_uid_t;
typedef uint32_t nuttx_dev_t;
typedef uint16_t nuttx_ino_t;
typedef uint32_t nuttx_ino_t;
typedef uint16_t nuttx_nlink_t;
# ifdef CONFIG_FS_LARGEFILE

View file

@ -144,7 +144,7 @@ typedef uint32_t dev_t;
/* ino_t is used for file serial numbers */
typedef uint16_t ino_t;
typedef uint32_t ino_t;
/* nlink_t is used for link counts */