On Mon, Jun 19, 2023 at 10:35:32AM +0800, zhujun2 wrote: > file system, the disk by-partlabel probability loss problem > > The superblock of ceph_bluestore exists in the first 1024 bytes, and the > real data is stored after 8K (that is, 16 sectors). By checking the source > code of blkid, it is found to check whether it is the xfs_external_log file > system, which is to cycle through the first 256k data range (the first > 512 sectors ). That is to say, when blkid judges whether the partition is > an xfs_external_log file system, it will mistakenly judge the real data of > ceph_bluestore. This means that if the user's data itself conforms to > the xfs_external_log format and is stored in sectors 17~512, it will be mistakenly > considered as the xfs_external_log file system. Not sure if I understand. According to docs BlueStore uses XFS partition to store metadata and another device to store raw data. It sounds like the XFS should be visible as a normal filesystem. >From your description it sounds like the both is on the same device and we should not detect it as XFS log. If yes, then I do not understand why anyone use XFS log header for this purpose. XFS log detection seems robust, so I guess if libblkid detects the superblock then it's really the FS. Karel > Signed-off-by: zhujun2 <zhujun2@xxxxxxxxxxxxxxxxxxxx> > --- > libblkid/src/superblocks/xfs.c | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/libblkid/src/superblocks/xfs.c b/libblkid/src/superblocks/xfs.c > index d8c6fb6d4..3686bd52b 100644 > --- a/libblkid/src/superblocks/xfs.c > +++ b/libblkid/src/superblocks/xfs.c > @@ -259,6 +259,11 @@ static int probe_xfs_log(blkid_probe pr, > if (memcmp(&buf[i*512], "XFSB", 4) == 0) > return 1; > > + if (memcmp(&buf[i*512], "bluestore block device", 22) == 0) { > + DBG(LOWPROBE, ul_debug("\t device has ceph_bluestore ambivalent")); > + return 1; > + } > + > rhead = (struct xlog_rec_header *)&buf[i*512]; > > if (xlog_valid_rec_header(rhead)) { > -- > 2.20.1 > > > -- Karel Zak <kzak@xxxxxxxxxx> http://karelzak.blogspot.com