Re: [PATCH v2 023/110] ceph: use PRIino format for i_ino
Viacheslav Dubeyko via Linux-f2fs-devel <[email protected]> Mon, 2 Mar 2026 22:24:35 +0000
| Newsgroups | gmane.linux.file-systems.f2fs,gmane.comp.video.dri.devel,gmane.linux.file-systems.union,gmane.linux.kernel.mm,gmane.linux.drivers.mtd,gmane.linux.kernel.cifs,gmane.comp.file-systems.nilfs.user,gmane.linux.x25,gmane.linux.bluez.kernel,gmane.linux.kernel.perf.user,gmane.comp.freedesktop.amd-gfx,gmane.comp.file-systems.coda.general,gmane.comp.file-systems.ext4,gmane.linux.kernel.autofs,gmane.comp.file-systems.ecryptfs.general,gmane.comp.security.apparmor,gmane.linux.drivers.video-input-infrastructure,gmane.linux.can,gmane.linux.hams,gmane.comp.file-systems.ceph.devel,gmane.linux.kernel.bpf,gmane.linux.nfs,gmane.linux.network,gmane.network.samba.internals,gmane.linux.kernel,gmane.linux.kernel.lsm,gmane.linux.file-systems |
|---|---|
| Message-ID | <[email protected]> |
On Mon, 2026-03-02 at 15:24 -0500, Jeff Layton wrote: > Convert ceph i_ino format strings to use the PRIino format > macro in preparation for the widening of i_ino via kino_t. > > Also correct signed format specifiers to unsigned, since inode > numbers are unsigned values. > > Signed-off-by: Jeff Layton <[email protected]> > --- > fs/ceph/crypto.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/fs/ceph/crypto.c b/fs/ceph/crypto.c > index f3de43ccb470ddbd7945426d79f9024ae615c127..718c194ba5d8ce22c6a5d1dd687ec3761263e7e1 100644 > --- a/fs/ceph/crypto.c > +++ b/fs/ceph/crypto.c > @@ -272,7 +272,7 @@ int ceph_encode_encrypted_dname(struct inode *parent, char *buf, int elen) > /* To understand the 240 limit, see CEPH_NOHASH_NAME_MAX comments */ > WARN_ON(elen > 240); > if (dir != parent) // leading _ is already there; append _<inum> > - elen += 1 + sprintf(p + elen, "_%ld", dir->i_ino); > + elen += 1 + sprintf(p + elen, "_%" PRIino "u", dir->i_ino); > > out: > kfree(cryptbuf); > @@ -377,7 +377,7 @@ int ceph_fname_to_usr(const struct ceph_fname *fname, struct fscrypt_str *tname, > if (!ret && (dir != fname->dir)) { > char tmp_buf[BASE64_CHARS(NAME_MAX)]; > > - name_len = snprintf(tmp_buf, sizeof(tmp_buf), "_%.*s_%ld", > + name_len = snprintf(tmp_buf, sizeof(tmp_buf), "_%.*s_%" PRIino "u", > oname->len, oname->name, dir->i_ino); > memcpy(oname->name, tmp_buf, name_len); > oname->len = name_len; Looks good. Reviewed-by: Viacheslav Dubeyko <[email protected]> Thanks, Slava.