]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
mds: generate symlink inode with correct mode 63937/head
authorKefu Chai <tchaikov@gmail.com>
Fri, 13 Jun 2025 12:22:20 +0000 (20:22 +0800)
committerKefu Chai <tchaikov@gmail.com>
Sun, 15 Jun 2025 06:54:54 +0000 (14:54 +0800)
commit7b631e7a480abc97205a1b668a17f42c6ec8b62c
tree9032f99d6056aeb366b0043385dd0229a78ff9ed
parentd28e5fe890016235e302122f955fc910c96f2d43
mds: generate symlink inode with correct mode

Fix test instance generation for InodeStoreBare and InodeStore to
properly set the mode field to S_IFLNK for symlink inodes.

Previously, generated test instances with symlink inodes had unset
mode fields, creating inconsistent data. This issue was masked because
ceph-dencoder reused existing instances during encode/decode consistency
tests, leaving stale values intact.

The problem would surface when check-generated.sh and readable.sh
allocate fresh instances for decoding tests, as the missing mode field
would cause decode/encode inconsistencies.

This change fixes generate_test_instances() to set the mode field to
S_IFLNK for symlink inodes, creating valid InodeStore and InodeStoreBare
instances with consistent field values for proper encode/decode testing.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
src/mds/CInode.cc