Details
-
Bug
-
Resolution: Unresolved
-
Medium
-
None
-
None
-
None
-
3
-
9223372036854775807
Description
In some cases (e.g. de->inode > 2^31 -1), the ino variable is too small to save the actual inode number, which will result in various unexpected errors.
lustre/osd-ldiskfs/osd_handler.c: static int osd_ea_lookup_rec(const struct lu_env *env, struct osd_object *obj, struct dt_rec *rec, const struct lu_name *ln) { struct inode *dir = obj->oo_inode; struct dentry *dentry; struct ldiskfs_dir_entry_2 *de; struct buffer_head *bh; struct lu_fid *fid = (struct lu_fid *)rec; struct htree_lock *hlock = NULL; int ino; int rc; ... bh = osd_ldiskfs_find_entry(dir, &dentry->d_name, &de, NULL, hlock); if (!IS_ERR(bh)) { struct osd_thread_info *oti = osd_oti_get(env); struct osd_inode_id *id = &oti->oti_id; struct osd_device *dev = osd_obj2dev(obj); ino = le32_to_cpu(de->inode); if (CFS_FAIL_CHECK(OBD_FAIL_FID_LOOKUP)) { brelse(bh); rc = osd_fail_fid_lookup(oti, dev, fid, ino); GOTO(out, rc); } rc = osd_get_fid_from_dentry(de, rec); ...