Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LU-1187 ofd: Allocate ofd group dynamically.
[fs/lustre-release.git]
/
lustre
/
ofd
/
ofd_objects.c
diff --git
a/lustre/ofd/ofd_objects.c
b/lustre/ofd/ofd_objects.c
index
c8fe60c
..
1dd1abb
100644
(file)
--- a/
lustre/ofd/ofd_objects.c
+++ b/
lustre/ofd/ofd_objects.c
@@
-146,7
+146,7
@@
void ofd_object_put(const struct lu_env *env, struct ofd_object *fo)
}
int ofd_precreate_objects(const struct lu_env *env, struct ofd_device *ofd,
}
int ofd_precreate_objects(const struct lu_env *env, struct ofd_device *ofd,
- obd_id id,
obd_seq
seq, int nr)
+ obd_id id,
struct ofd_seq *o
seq, int nr)
{
struct ofd_thread_info *info = ofd_info(env);
struct ofd_object *fo = NULL;
{
struct ofd_thread_info *info = ofd_info(env);
struct ofd_object *fo = NULL;
@@
-162,14
+162,14
@@
int ofd_precreate_objects(const struct lu_env *env, struct ofd_device *ofd,
ENTRY;
/* Don't create objects beyond the valid range for this SEQ */
ENTRY;
/* Don't create objects beyond the valid range for this SEQ */
- if (unlikely(fid_seq_is_mdt0(seq) && (id + nr) >= IDIF_MAX_OID)) {
+ if (unlikely(fid_seq_is_mdt0(
oseq->os_
seq) && (id + nr) >= IDIF_MAX_OID)) {
CERROR("%s:"POSTID" hit the IDIF_MAX_OID (1<<48)!\n",
CERROR("%s:"POSTID" hit the IDIF_MAX_OID (1<<48)!\n",
- ofd_name(ofd), id, seq);
+ ofd_name(ofd), id,
oseq->os_
seq);
RETURN(rc = -ENOSPC);
RETURN(rc = -ENOSPC);
- } else if (unlikely(!fid_seq_is_mdt0(seq) &&
- (id + nr) >= OBIF_MAX_OID)) {
+ } else if (unlikely(!fid_seq_is_mdt0(
oseq->os_
seq) &&
+
(id + nr) >= OBIF_MAX_OID)) {
CERROR("%s:"POSTID" hit the OBIF_MAX_OID (1<<32)!\n",
CERROR("%s:"POSTID" hit the OBIF_MAX_OID (1<<32)!\n",
- ofd_name(ofd), id, seq);
+ ofd_name(ofd), id,
oseq->os_
seq);
RETURN(rc = -ENOSPC);
}
RETURN(rc = -ENOSPC);
}
@@
-197,7
+197,7
@@
int ofd_precreate_objects(const struct lu_env *env, struct ofd_device *ofd,
/* prepare objects */
for (i = 0; i < nr; i++) {
info->fti_ostid.oi_id = id + i;
/* prepare objects */
for (i = 0; i < nr; i++) {
info->fti_ostid.oi_id = id + i;
- info->fti_ostid.oi_seq = seq;
+ info->fti_ostid.oi_seq =
oseq->os_
seq;
rc = fid_ostid_unpack(&info->fti_fid, &info->fti_ostid, 0);
if (rc) {
rc = fid_ostid_unpack(&info->fti_fid, &info->fti_ostid, 0);
if (rc) {
@@
-228,8
+228,8
@@
int ofd_precreate_objects(const struct lu_env *env, struct ofd_device *ofd,
if (IS_ERR(th))
GOTO(out, rc = PTR_ERR(th));
if (IS_ERR(th))
GOTO(out, rc = PTR_ERR(th));
- rc = dt_declare_record_write(env, o
fd->ofd_lastid_obj[seq]
,
-
sizeof(tmp),
info->fti_off, th);
+ rc = dt_declare_record_write(env, o
seq->os_lastid_obj, sizeof(tmp)
,
+ info->fti_off, th);
if (rc)
GOTO(trans_stop, rc);
if (rc)
GOTO(trans_stop, rc);
@@
-239,8
+239,9
@@
int ofd_precreate_objects(const struct lu_env *env, struct ofd_device *ofd,
if (unlikely(ofd_object_exists(fo))) {
/* object may exist being re-created by write replay */
if (unlikely(ofd_object_exists(fo))) {
/* object may exist being re-created by write replay */
- CDEBUG(D_INODE, "object "LPD64"/"LPD64" exists: "
- DFID"\n", seq, id, PFID(&info->fti_fid));
+ CDEBUG(D_INODE, "object "LPX64"/"LPX64" exists: "
+ DFID"\n", oseq->os_seq, id,
+ PFID(&info->fti_fid));
continue;
}
continue;
}
@@
-275,13
+276,13
@@
int ofd_precreate_objects(const struct lu_env *env, struct ofd_device *ofd,
break;
LASSERT(ofd_object_exists(fo));
}
break;
LASSERT(ofd_object_exists(fo));
}
- ofd_
last_id_set(ofd, id + i, seq
);
+ ofd_
seq_last_oid_set(oseq, id + i
);
}
objects = i;
if (objects > 0) {
}
objects = i;
if (objects > 0) {
- tmp = cpu_to_le64(ofd_
last_id(ofd,
seq));
- rc = dt_record_write(env, o
fd->ofd_lastid_obj[seq]
,
+ tmp = cpu_to_le64(ofd_
seq_last_oid(o
seq));
+ rc = dt_record_write(env, o
seq->os_lastid_obj
,
&info->fti_buf, &info->fti_off, th);
}
trans_stop:
&info->fti_buf, &info->fti_off, th);
}
trans_stop: