if (IS_ERR(jh))
return PTR_ERR(jh);
- inode = ldiskfs_create_inode(jh, dir, (S_IFREG | S_IRUGO | S_IWUSR));
+ inode = ldiskfs_create_inode(jh, dir, (S_IFREG | S_IRUGO | S_IWUSR),
+ NULL);
if (IS_ERR(inode)) {
ldiskfs_journal_stop(jh);
return PTR_ERR(inode);
struct inode *inode;
int rc;
- dentry = ll_lookup_one_len(name, osd_sb(osd)->s_root, strlen(name));
+ dentry = osd_lookup_one_len_unlocked(osd, name, osd_sb(osd)->s_root,
+ strlen(name));
if (IS_ERR(dentry))
- return (void *) dentry;
+ return ERR_CAST(dentry);
if (dentry->d_inode) {
LASSERT(!is_bad_inode(dentry->d_inode));
if (rc)
return ERR_PTR(rc);
- dentry = ll_lookup_one_len(name, osd_sb(osd)->s_root, strlen(name));
+ dentry = osd_lookup_one_len_unlocked(osd, name, osd_sb(osd)->s_root,
+ strlen(name));
if (IS_ERR(dentry))
- return (void *) dentry;
+ return ERR_CAST(dentry);
if (dentry->d_inode) {
LASSERT(!is_bad_inode(dentry->d_inode));
RETURN(count);
}
-static int osd_remove_oi_one(struct dentry *parent, const char *name,
- int namelen)
+static int osd_remove_oi_one(struct osd_device *osd, struct dentry *parent,
+ const char *name, int namelen)
{
struct dentry *child;
int rc;
- child = ll_lookup_one_len(name, parent, namelen);
+ child = osd_lookup_one_len_unlocked(osd, name, parent, namelen);
if (IS_ERR(child)) {
rc = PTR_ERR(child);
} else {
for (i = 0; i < OSD_OI_FID_NR_MAX; i++) {
namelen = snprintf(name, sizeof(name), "%s.%d",
OSD_OI_NAME_BASE, i);
- rc = osd_remove_oi_one(osd_sb(osd)->s_root, name, namelen);
+ rc = osd_remove_oi_one(osd, osd_sb(osd)->s_root, name, namelen);
if (rc != 0) {
CERROR("%s: fail to remove the stale OI file %s: "
"rc = %d\n", osd_dev2name(osd), name, rc);
}
namelen = snprintf(name, sizeof(name), "%s", OSD_OI_NAME_BASE);
- rc = osd_remove_oi_one(osd_sb(osd)->s_root, name, namelen);
+ rc = osd_remove_oi_one(osd, osd_sb(osd)->s_root, name, namelen);
if (rc != 0)
CERROR("%s: fail to remove the stale OI file %s: rc = %d\n",
osd_dev2name(osd), name, rc);
sf->sf_oi_count = osd_oi_count;
}
- scrub_file_reset(scrub, LDISKFS_SB(osd_sb(osd))->s_es->s_uuid,
- SF_RECREATED);
+ scrub_file_reset(scrub, osd->od_uuid, SF_RECREATED);
count = sf->sf_oi_count;
goto create;
}
* and restored after former upgrading from 1.8
* to 2.x. Fortunately, the osd_fid_lookup()can
* verify the inode to decrease the risk. */
- scrub_file_reset(scrub,
- LDISKFS_SB(osd_sb(osd))->s_es->s_uuid,
- SF_UPGRADE);
+ scrub_file_reset(scrub, osd->od_uuid, SF_UPGRADE);
GOTO(out, rc = 1);
} else if (rc != -ENOENT) {
CERROR("%s: can't open %s: rc = %d\n",
memset(sf->sf_oi_bitmap, 0, SCRUB_OI_BITMAP_SIZE);
for (i = 0; i < count; i++)
ldiskfs_set_bit(i, sf->sf_oi_bitmap);
- scrub_file_reset(scrub, LDISKFS_SB(osd_sb(osd))->s_es->s_uuid,
- SF_RECREATED);
+ scrub_file_reset(scrub, osd->od_uuid, SF_RECREATED);
} else {
count = sf->sf_oi_count = osd_oi_count;
}
if (unlikely(fid_is_last_id(fid)))
return osd_obj_spec_lookup(info, osd, fid, id);
- if (fid_is_on_ost(info, osd, fid, flags) || fid_is_llog(fid))
+ if (fid_is_llog(fid) || fid_is_on_ost(info, osd, fid, flags))
return osd_obj_map_lookup(info, osd, fid, id);
LASSERT(oi);
LASSERT(oi->oi_inode);
- ll_vfs_dq_init(oi->oi_inode);
+ dquot_initialize(oi->oi_inode);
bag = &oi->oi_dir.od_container;
ipd = osd_idx_ipd_get(oti->oti_env, bag);
if (unlikely(fid_is_last_id(fid)))
return osd_obj_spec_insert(info, osd, fid, id, th);
- if (fid_is_on_ost(info, osd, fid, flags) || fid_is_llog(fid))
+ if (fid_is_llog(fid) || fid_is_on_ost(info, osd, fid, flags))
return osd_obj_map_insert(info, osd, fid, id, th);
fid_cpu_to_be(oi_fid, fid);
LASSERT(oi);
LASSERT(oi->oi_inode);
- ll_vfs_dq_init(oi->oi_inode);
+ dquot_initialize(oi->oi_inode);
bag = &oi->oi_dir.od_container;
ipd = osd_idx_ipd_get(oti->oti_env, bag);
if (fid_is_last_id(fid))
return 0;
- if (fid_is_on_ost(info, osd, fid, flags) || fid_is_llog(fid))
+ if (fid_is_llog(fid) || fid_is_on_ost(info, osd, fid, flags))
return osd_obj_map_delete(info, osd, fid, th);
fid_cpu_to_be(oi_fid, fid);
if (unlikely(fid_is_last_id(fid)))
return osd_obj_spec_update(info, osd, fid, id, th);
- if (fid_is_on_ost(info, osd, fid, flags) || fid_is_llog(fid))
+ if (fid_is_llog(fid) || fid_is_on_ost(info, osd, fid, flags))
return osd_obj_map_update(info, osd, fid, id, th);
fid_cpu_to_be(oi_fid, fid);