Ignore request compound ids in the HSM coordinator. Compound ids
prevent batching of CDT to CT requests and degrade HSM
performance. Use CT/archive id compatabiliy when deciding which HSM
actions to put in a request.
Test-Parameters: trivial testlist=sanity-hsm
Signed-off-by: John L. Hammond <john.hammond@intel.com>
Change-Id: I38513f3b75313eb78bfb9811ab4e40e3e2b904c7
Reviewed-on: https://review.whamcloud.com/30949
Tested-by: Jenkins
Reviewed-by: Quentin Bouget <quentin.bouget@cea.fr>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Faccini Bruno <bruno.faccini@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
struct hsm_action_list {
__u32 hal_version;
__u32 hal_count; /* number of hai\(aqs to follow */
struct hsm_action_list {
__u32 hal_version;
__u32 hal_count; /* number of hai\(aqs to follow */
- __u64 hal_compound_id; /* returned by coordinator */
+ __u64 hal_compound_id; /* obsolete and may be ignored */
__u64 hal_flags;
__u32 hal_archive_id; /* which archive backend */
__u32 padding1;
__u64 hal_flags;
__u32 hal_archive_id; /* which archive backend */
__u32 padding1;
* agent_req_status */
__u32 arr_archive_id; /**< backend archive number */
__u64 arr_flags; /**< req flags */
* agent_req_status */
__u32 arr_archive_id; /**< backend archive number */
__u64 arr_flags; /**< req flags */
- __u64 arr_compound_id; /**< compound cookie */
+ __u64 arr_compound_id; /**< compound cookie, ignored */
__u64 arr_req_create; /**< req. creation time */
__u64 arr_req_change; /**< req. status change time */
struct hsm_action_item arr_hai; /**< req. to the agent */
__u64 arr_req_create; /**< req. creation time */
__u64 arr_req_change; /**< req. status change time */
struct hsm_action_item arr_hai; /**< req. to the agent */
struct hsm_action_list {
__u32 hal_version;
__u32 hal_count; /* number of hai's to follow */
struct hsm_action_list {
__u32 hal_version;
__u32 hal_count; /* number of hai's to follow */
- __u64 hal_compound_id; /* returned by coordinator */
+ __u64 hal_compound_id; /* returned by coordinator, ignored */
__u64 hal_flags;
__u32 hal_archive_id; /* which archive backend */
__u32 padding1;
__u64 hal_flags;
__u32 hal_archive_id; /* which archive backend */
__u32 padding1;
struct hsm_action_item *hai;
char buf[12];
struct hsm_action_item *hai;
char buf[12];
- CDEBUG(level, "%s: HAL header: version %X count %d compound %#llx"
+ CDEBUG(level, "%s: HAL header: version %X count %d"
" archive_id %d flags %#llx\n",
prefix, hal->hal_version, hal->hal_count,
" archive_id %d flags %#llx\n",
prefix, hal->hal_version, hal->hal_count,
- hal->hal_compound_id, hal->hal_archive_id, hal->hal_flags);
+ hal->hal_archive_id, hal->hal_flags);
hai = hai_first(hal);
for (i = 0; i < hal->hal_count; i++) {
sz = hai->hai_len - sizeof(*hai);
CDEBUG(level, "%s %d: fid="DFID" dfid="DFID
hai = hai_first(hal);
for (i = 0; i < hal->hal_count; i++) {
sz = hai->hai_len - sizeof(*hai);
CDEBUG(level, "%s %d: fid="DFID" dfid="DFID
- " compound/cookie=%#llx/%#llx"
" action=%s extent=%#llx-%#llx gid=%#llx"
" datalen=%d data=[%s]\n",
prefix, i,
PFID(&hai->hai_fid), PFID(&hai->hai_dfid),
" action=%s extent=%#llx-%#llx gid=%#llx"
" datalen=%d data=[%s]\n",
prefix, i,
PFID(&hai->hai_fid), PFID(&hai->hai_dfid),
- hal->hal_compound_id, hai->hai_cookie,
hsm_copytool_action2name(hai->hai_action),
hai->hai_extent.offset,
hai->hai_extent.length,
hsm_copytool_action2name(hai->hai_action),
hai->hai_extent.offset,
hai->hai_extent.length,
struct coordinator *cdt = &mdt->mdt_coordinator;
struct hsm_scan_request *request;
struct hsm_action_item *hai;
struct coordinator *cdt = &mdt->mdt_coordinator;
struct hsm_scan_request *request;
struct hsm_action_item *hai;
+ size_t hai_size;
+ u32 archive_id;
int i;
/* Are agents full? */
int i;
/* Are agents full? */
- /* first search whether the request is found in the list we
- * have built. */
+ hai_size = cfs_size_round(larr->arr_hai.hai_len);
+ archive_id = larr->arr_archive_id;
+
+ /* Can we add this action to one of the existing HALs in hsd. */
request = NULL;
for (i = 0; i < hsd->hsd_request_count; i++) {
request = NULL;
for (i = 0; i < hsd->hsd_request_count; i++) {
- if (hsd->hsd_request[i].hal->hal_compound_id ==
- larr->arr_compound_id) {
+ if (hsd->hsd_request[i].hal->hal_archive_id == archive_id &&
+ hsd->hsd_request[i].hal_used_sz + hai_size <=
+ LDLM_MAXREQSIZE) {
request = &hsd->hsd_request[i];
break;
}
request = &hsd->hsd_request[i];
break;
}
/* allocates hai vector size just needs to be large
* enough */
request->hal_sz = sizeof(*request->hal) +
/* allocates hai vector size just needs to be large
* enough */
request->hal_sz = sizeof(*request->hal) +
- cfs_size_round(MTI_NAME_MAXLEN + 1) +
- 2 * cfs_size_round(larr->arr_hai.hai_len);
- OBD_ALLOC(hal, request->hal_sz);
+ cfs_size_round(MTI_NAME_MAXLEN + 1) + 2 * hai_size;
+ OBD_ALLOC_LARGE(hal, request->hal_sz);
if (!hal)
RETURN(-ENOMEM);
hal->hal_version = HAL_VERSION;
strlcpy(hal->hal_fsname, hsd->hsd_fsname, MTI_NAME_MAXLEN + 1);
if (!hal)
RETURN(-ENOMEM);
hal->hal_version = HAL_VERSION;
strlcpy(hal->hal_fsname, hsd->hsd_fsname, MTI_NAME_MAXLEN + 1);
- hal->hal_compound_id = larr->arr_compound_id;
hal->hal_archive_id = larr->arr_archive_id;
hal->hal_flags = larr->arr_flags;
hal->hal_count = 0;
request->hal_used_sz = hal_size(hal);
request->hal = hal;
hsd->hsd_request_count++;
hal->hal_archive_id = larr->arr_archive_id;
hal->hal_flags = larr->arr_flags;
hal->hal_count = 0;
request->hal_used_sz = hal_size(hal);
request->hal = hal;
hsd->hsd_request_count++;
- hai = hai_first(hal);
- } else {
- /* request is known */
- /* we check if record archive num is the same as the
- * known request, if not we will serve it in multiple
- * time because we do not know if the agent can serve
- * multiple backend a use case is a compound made of
- * multiple restore where the files are not archived
- * in the same backend */
- if (larr->arr_archive_id != request->hal->hal_archive_id)
- RETURN(0);
+ } else if (request->hal_sz < request->hal_used_sz + hai_size) {
+ /* Not enough room, need an extension */
+ void *hal_buffer;
+ int sz;
- if (request->hal_sz < request->hal_used_sz +
- cfs_size_round(larr->arr_hai.hai_len)) {
- /* Not enough room, need an extension */
- void *hal_buffer;
- int sz;
-
- sz = 2 * request->hal_sz;
- OBD_ALLOC(hal_buffer, sz);
- if (!hal_buffer)
- RETURN(-ENOMEM);
- memcpy(hal_buffer, request->hal, request->hal_used_sz);
- OBD_FREE(request->hal, request->hal_sz);
- request->hal = hal_buffer;
- request->hal_sz = sz;
- }
+ sz = min_t(int, 2 * request->hal_sz, LDLM_MAXREQSIZE);
+ LASSERT(request->hal_used_sz + hai_size < sz);
- hai = hai_first(request->hal);
- for (i = 0; i < request->hal->hal_count; i++)
- hai = hai_next(hai);
+ OBD_ALLOC_LARGE(hal_buffer, sz);
+ if (!hal_buffer)
+ RETURN(-ENOMEM);
+
+ memcpy(hal_buffer, request->hal, request->hal_used_sz);
+ OBD_FREE_LARGE(request->hal, request->hal_sz);
+ request->hal = hal_buffer;
+ request->hal_sz = sz;
+ hai = hai_first(request->hal);
+ for (i = 0; i < request->hal->hal_count; i++)
+ hai = hai_next(hai);
+
memcpy(hai, &larr->arr_hai, larr->arr_hai.hai_len);
memcpy(hai, &larr->arr_hai, larr->arr_hai.hai_len);
- hai->hai_cookie = larr->arr_hai.hai_cookie;
- hai->hai_gid = larr->arr_hai.hai_gid;
request->hal_used_sz += cfs_size_round(hai->hai_len);
request->hal->hal_count++;
request->hal_used_sz += cfs_size_round(hai->hai_len);
request->hal->hal_count++;
/* Allocate a temporary array to store the cookies to
* update, and their status. */
updates_sz = updates_cnt * sizeof(*updates);
/* Allocate a temporary array to store the cookies to
* update, and their status. */
updates_sz = updates_cnt * sizeof(*updates);
- OBD_ALLOC(updates, updates_sz);
+ OBD_ALLOC_LARGE(updates, updates_sz);
if (updates == NULL) {
CERROR("%s: Cannot allocate memory (%d o) "
"for %d updates\n",
if (updates == NULL) {
CERROR("%s: Cannot allocate memory (%d o) "
"for %d updates\n",
mdt_obd_name(mdt), rc, update_idx);
}
mdt_obd_name(mdt), rc, update_idx);
}
- OBD_FREE(updates, updates_sz);
+ OBD_FREE_LARGE(updates, updates_sz);
clean_cb_alloc:
/* free hal allocated by callback */
for (i = 0; i < hsd.hsd_request_count; i++) {
struct hsm_scan_request *request = &hsd.hsd_request[i];
clean_cb_alloc:
/* free hal allocated by callback */
for (i = 0; i < hsd.hsd_request_count; i++) {
struct hsm_scan_request *request = &hsd.hsd_request[i];
- OBD_FREE(request->hal, request->hal_sz);
+ OBD_FREE_LARGE(request->hal, request->hal_sz);
cdt->cdt_policy = CDT_DEFAULT_POLICY;
cdt->cdt_active_req_timeout = 3600;
cdt->cdt_policy = CDT_DEFAULT_POLICY;
cdt->cdt_active_req_timeout = 3600;
- /* Initialize cdt_compound_id here to allow its usage for
- * delayed requests from RAoLU policy */
- atomic_set(&cdt->cdt_compound_id, ktime_get_real_seconds());
-
/* by default do not remove archives on last unlink */
cdt->cdt_remove_archive_on_last_unlink = false;
/* by default do not remove archives on last unlink */
cdt->cdt_remove_archive_on_last_unlink = false;
- car = mdt_cdt_alloc_request(hal->hal_compound_id,
- hal->hal_archive_id, hal->hal_flags,
+ car = mdt_cdt_alloc_request(hal->hal_archive_id, hal->hal_flags,
uuid, hai);
if (IS_ERR(car))
GOTO(out, rc = PTR_ERR(car));
uuid, hai);
if (IS_ERR(car))
GOTO(out, rc = PTR_ERR(car));
obd_uuid2fsname(hal->hal_fsname, mdt_obd_name(mdt),
MTI_NAME_MAXLEN);
hal->hal_fsname[MTI_NAME_MAXLEN] = '\0';
obd_uuid2fsname(hal->hal_fsname, mdt_obd_name(mdt),
MTI_NAME_MAXLEN);
hal->hal_fsname[MTI_NAME_MAXLEN] = '\0';
- hal->hal_compound_id = car->car_compound_id;
hal->hal_archive_id = car->car_archive_id;
hal->hal_flags = car->car_flags;
hal->hal_count = 0;
hal->hal_archive_id = car->car_archive_id;
hal->hal_flags = car->car_flags;
hal->hal_count = 0;
sz = larr->arr_hai.hai_len - sizeof(larr->arr_hai);
CDEBUG(D_HSM, "%slrh=[type=%X len=%d idx=%d] fid="DFID
" dfid="DFID
sz = larr->arr_hai.hai_len - sizeof(larr->arr_hai);
CDEBUG(D_HSM, "%slrh=[type=%X len=%d idx=%d] fid="DFID
" dfid="DFID
- " compound/cookie=%#llx/%#llx"
" status=%s action=%s archive#=%d flags=%#llx"
" create=%llu change=%llu"
" extent=%#llx-%#llx gid=%#llx datalen=%d"
" status=%s action=%s archive#=%d flags=%#llx"
" create=%llu change=%llu"
" extent=%#llx-%#llx gid=%#llx datalen=%d"
larr->arr_hdr.lrh_len, larr->arr_hdr.lrh_index,
PFID(&larr->arr_hai.hai_fid),
PFID(&larr->arr_hai.hai_dfid),
larr->arr_hdr.lrh_len, larr->arr_hdr.lrh_index,
PFID(&larr->arr_hai.hai_fid),
PFID(&larr->arr_hai.hai_dfid),
- larr->arr_compound_id, larr->arr_hai.hai_cookie,
+ larr->arr_hai.hai_cookie,
agent_req_status2name(larr->arr_status),
hsm_copytool_action2name(larr->arr_hai.hai_action),
larr->arr_archive_id,
agent_req_status2name(larr->arr_status),
hsm_copytool_action2name(larr->arr_hai.hai_action),
larr->arr_archive_id,
* add an entry in agent llog
* \param env [IN] environment
* \param mdt [IN] PDT device
* add an entry in agent llog
* \param env [IN] environment
* \param mdt [IN] PDT device
- * \param compound_id [IN] global id associated with the record
* \param archive_id [IN] backend archive number
* \param hai [IN] record to register
* \retval 0 success
* \retval -ve failure
*/
* \param archive_id [IN] backend archive number
* \param hai [IN] record to register
* \retval 0 success
* \retval -ve failure
*/
-int mdt_agent_record_add(const struct lu_env *env,
- struct mdt_device *mdt,
- __u64 compound_id, __u32 archive_id,
- __u64 flags, struct hsm_action_item *hai)
+int mdt_agent_record_add(const struct lu_env *env, struct mdt_device *mdt,
+ __u32 archive_id, __u64 flags,
+ struct hsm_action_item *hai)
{
struct obd_device *obd = mdt2obd_dev(mdt);
struct coordinator *cdt = &mdt->mdt_coordinator;
{
struct obd_device *obd = mdt2obd_dev(mdt);
struct coordinator *cdt = &mdt->mdt_coordinator;
larr->arr_hdr.lrh_len = sz;
larr->arr_hdr.lrh_type = HSM_AGENT_REC;
larr->arr_status = ARS_WAITING;
larr->arr_hdr.lrh_len = sz;
larr->arr_hdr.lrh_type = HSM_AGENT_REC;
larr->arr_status = ARS_WAITING;
- larr->arr_compound_id = compound_id;
larr->arr_archive_id = archive_id;
larr->arr_flags = flags;
larr->arr_req_create = ktime_get_real_seconds();
larr->arr_archive_id = archive_id;
larr->arr_flags = flags;
larr->arr_req_create = ktime_get_real_seconds();
llh->lgh_hdr->llh_cat_idx, hdr->lrh_index,
PFID(&larr->arr_hai.hai_fid),
PFID(&larr->arr_hai.hai_dfid),
llh->lgh_hdr->llh_cat_idx, hdr->lrh_index,
PFID(&larr->arr_hai.hai_fid),
PFID(&larr->arr_hai.hai_dfid),
- larr->arr_compound_id, larr->arr_hai.hai_cookie,
+ 0ULL /* compound_id */, larr->arr_hai.hai_cookie,
hsm_copytool_action2name(larr->arr_hai.hai_action),
larr->arr_archive_id,
larr->arr_flags,
hsm_copytool_action2name(larr->arr_hai.hai_action),
larr->arr_archive_id,
larr->arr_flags,
int mdt_hsm_send_action_to_each_archive(struct mdt_thread_info *mti,
struct hsm_action_item *hai)
{
int mdt_hsm_send_action_to_each_archive(struct mdt_thread_info *mti,
struct hsm_action_item *hai)
{
struct hsm_agent *ha;
__u32 archive_mask = 0;
struct coordinator *cdt = &mti->mti_mdt->mdt_coordinator;
struct hsm_agent *ha;
__u32 archive_mask = 0;
struct coordinator *cdt = &mti->mti_mdt->mdt_coordinator;
continue;
archive_mask |= (1 << ha->ha_archive_id[i]);
continue;
archive_mask |= (1 << ha->ha_archive_id[i]);
- /* XXX: instead of creating one request record per
- * new action, it could make sense to gather
- * all for the same archive_id as one compound
- * request/id, like in mdt_hsm_add_actions() ?? */
- compound_id = atomic_inc_return(&cdt->cdt_compound_id);
+ /* XXX: it could make sense to gather all
+ * actions for the same archive_id like in
+ * mdt_hsm_add_actions() ?? */
rc = mdt_agent_record_add(mti->mti_env, mti->mti_mdt,
rc = mdt_agent_record_add(mti->mti_env, mti->mti_mdt,
ha->ha_archive_id[i], 0,
hai);
if (rc) {
ha->ha_archive_id[i], 0,
hai);
if (rc) {
- * send a compound request to the agent
+ * send a HAL to the agent
* \param mti [IN] context
* \param hal [IN] request (can be a kuc payload)
* \param purge [IN] purge mode (no record)
* \param mti [IN] context
* \param hal [IN] request (can be a kuc payload)
* \param purge [IN] purge mode (no record)
/* incompatible request, we abort the request */
/* next time coordinator will wake up, it will
/* incompatible request, we abort the request */
/* next time coordinator will wake up, it will
- * make the same compound with valid only
+ * make the same HAL with valid only
* records */
fail_request = true;
rc = mdt_agent_record_update(mti->mti_env, mdt,
* records */
fail_request = true;
rc = mdt_agent_record_update(mti->mti_env, mdt,
- /* we found incompatible requests, so the compound cannot be send
+ /* we found incompatible requests, so the HAL cannot be sent
* as is. Bad records have been invalidated in llog.
* Valid one will be reschedule next time coordinator will wake up
* as is. Bad records have been invalidated in llog.
* Valid one will be reschedule next time coordinator will wake up
- * So no need the rebuild a full valid compound request now
+ * So no need the rebuild a full valid HAL now
*/
if (fail_request)
GOTO(out_buf, rc = 0);
*/
if (fail_request)
GOTO(out_buf, rc = 0);
int rc, i;
struct md_hsm mh;
bool is_restore = false;
int rc, i;
struct md_hsm mh;
bool is_restore = false;
- __u64 compound_id;
-
- compound_id = atomic_inc_return(&cdt->cdt_compound_id);
hai = hai_first(hal);
for (i = 0; i < hal->hal_count; i++, hai = hai_next(hai)) {
hai = hai_first(hal);
for (i = 0; i < hal->hal_count; i++, hai = hai_next(hai)) {
* or we use the default if none found in lma
* this works also for archive because the default value is 0
* /!\ there is a side effect: in case of restore on multiple
* or we use the default if none found in lma
* this works also for archive because the default value is 0
* /!\ there is a side effect: in case of restore on multiple
- * files which are in different backend, the initial compound
+ * files which are in different backend, the initial
* request will be split in multiple requests because we cannot
* warranty an agent can serve any combinaison of archive
* backend
* request will be split in multiple requests because we cannot
* warranty an agent can serve any combinaison of archive
* backend
*/
OBD_FAIL_TIMEOUT(OBD_FAIL_MDS_HSM_CDT_DELAY, cfs_fail_val);
/* record request */
*/
OBD_FAIL_TIMEOUT(OBD_FAIL_MDS_HSM_CDT_DELAY, cfs_fail_val);
/* record request */
- rc = mdt_agent_record_add(mti->mti_env, mdt, compound_id,
- archive_id, flags, hai);
+ rc = mdt_agent_record_add(mti->mti_env, mdt, archive_id, flags,
+ hai);
down_read(&cdt->cdt_request_lock);
list_for_each_entry(car, &cdt->cdt_request_list, car_request_list) {
CDEBUG(D_HSM, "%s fid="DFID" dfid="DFID
down_read(&cdt->cdt_request_lock);
list_for_each_entry(car, &cdt->cdt_request_list, car_request_list) {
CDEBUG(D_HSM, "%s fid="DFID" dfid="DFID
- " compound/cookie=%#llx/%#llx"
" action=%s archive#=%d flags=%#llx"
" extent=%#llx-%#llx"
" gid=%#llx refcount=%d canceled=%d\n",
prefix, PFID(&car->car_hai->hai_fid),
PFID(&car->car_hai->hai_dfid),
" action=%s archive#=%d flags=%#llx"
" extent=%#llx-%#llx"
" gid=%#llx refcount=%d canceled=%d\n",
prefix, PFID(&car->car_hai->hai_fid),
PFID(&car->car_hai->hai_dfid),
- car->car_compound_id, car->car_hai->hai_cookie,
+ car->car_hai->hai_cookie,
hsm_copytool_action2name(car->car_hai->hai_action),
car->car_archive_id, car->car_flags,
car->car_hai->hai_extent.offset,
hsm_copytool_action2name(car->car_hai->hai_action),
car->car_archive_id, car->car_flags,
car->car_hai->hai_extent.offset,
/** Allocate/init an agent request and its sub-structures.
*
/** Allocate/init an agent request and its sub-structures.
*
- * \param compound_id [IN]
* \param archive_id [IN]
* \param flags [IN]
* \param uuid [IN]
* \param archive_id [IN]
* \param flags [IN]
* \param uuid [IN]
* \retval car [OUT] success valid structure
* \retval car [OUT]
*/
* \retval car [OUT] success valid structure
* \retval car [OUT]
*/
-struct cdt_agent_req *mdt_cdt_alloc_request(__u64 compound_id, __u32 archive_id,
- __u64 flags, struct obd_uuid *uuid,
+struct cdt_agent_req *mdt_cdt_alloc_request(__u32 archive_id, __u64 flags,
+ struct obd_uuid *uuid,
struct hsm_action_item *hai)
{
struct cdt_agent_req *car;
struct hsm_action_item *hai)
{
struct cdt_agent_req *car;
RETURN(ERR_PTR(-ENOMEM));
atomic_set(&car->car_refcount, 1);
RETURN(ERR_PTR(-ENOMEM));
atomic_set(&car->car_refcount, 1);
- car->car_compound_id = compound_id;
car->car_archive_id = archive_id;
car->car_flags = flags;
car->car_canceled = 0;
car->car_archive_id = archive_id;
car->car_flags = flags;
car->car_canceled = 0;
" data=[%s] canceled=%d uuid=%s done=%llu\n",
PFID(&car->car_hai->hai_fid),
PFID(&car->car_hai->hai_dfid),
" data=[%s] canceled=%d uuid=%s done=%llu\n",
PFID(&car->car_hai->hai_fid),
PFID(&car->car_hai->hai_dfid),
- car->car_compound_id, car->car_hai->hai_cookie,
+ 0ULL /* compound_id */, car->car_hai->hai_cookie,
hsm_copytool_action2name(car->car_hai->hai_action),
car->car_archive_id, car->car_flags,
car->car_hai->hai_extent.offset,
hsm_copytool_action2name(car->car_hai->hai_action),
car->car_archive_id, car->car_flags,
car->car_hai->hai_extent.offset,
__u64 cdt_policy; /**< policy flags */
enum cdt_states cdt_state; /**< state */
struct mutex cdt_state_lock; /**< cdt_state lock */
__u64 cdt_policy; /**< policy flags */
enum cdt_states cdt_state; /**< state */
struct mutex cdt_state_lock; /**< cdt_state lock */
- atomic_t cdt_compound_id; /**< compound id
- * counter */
__u64 cdt_last_cookie; /**< last cookie
* allocated */
struct rw_semaphore cdt_llog_lock; /**< protect llog
__u64 cdt_last_cookie; /**< last cookie
* allocated */
struct rw_semaphore cdt_llog_lock; /**< protect llog
struct hlist_node car_cookie_hash; /**< find req by cookie */
struct list_head car_request_list; /**< to chain all the req. */
atomic_t car_refcount; /**< reference counter */
struct hlist_node car_cookie_hash; /**< find req by cookie */
struct list_head car_request_list; /**< to chain all the req. */
atomic_t car_refcount; /**< reference counter */
- __u64 car_compound_id; /**< compound id */
__u64 car_flags; /**< request original flags */
struct obd_uuid car_uuid; /**< agent doing the req. */
__u32 car_archive_id; /**< archive id */
__u64 car_flags; /**< request original flags */
struct obd_uuid car_uuid; /**< agent doing the req. */
__u32 car_archive_id; /**< archive id */
llog_cb_t cb, void *data, u32 start_cat_idx,
u32 start_rec_idx, int rw);
int mdt_agent_record_add(const struct lu_env *env, struct mdt_device *mdt,
llog_cb_t cb, void *data, u32 start_cat_idx,
u32 start_rec_idx, int rw);
int mdt_agent_record_add(const struct lu_env *env, struct mdt_device *mdt,
- __u64 compound_id, __u32 archive_id,
- __u64 flags, struct hsm_action_item *hai);
+ __u32 archive_id, __u64 flags,
+ struct hsm_action_item *hai);
int mdt_agent_record_update(const struct lu_env *env, struct mdt_device *mdt,
struct hsm_record_update *updates,
unsigned int updates_count);
int mdt_agent_record_update(const struct lu_env *env, struct mdt_device *mdt,
struct hsm_record_update *updates,
unsigned int updates_count);
extern struct cfs_hash_ops cdt_agent_record_hash_ops;
extern const struct file_operations mdt_hsm_active_requests_fops;
void dump_requests(char *prefix, struct coordinator *cdt);
extern struct cfs_hash_ops cdt_agent_record_hash_ops;
extern const struct file_operations mdt_hsm_active_requests_fops;
void dump_requests(char *prefix, struct coordinator *cdt);
-struct cdt_agent_req *mdt_cdt_alloc_request(__u64 compound_id, __u32 archive_id,
- __u64 flags, struct obd_uuid *uuid,
+struct cdt_agent_req *mdt_cdt_alloc_request(__u32 archive_id, __u64 flags,
+ struct obd_uuid *uuid,
struct hsm_action_item *hai);
void mdt_cdt_free_request(struct cdt_agent_req *car);
int mdt_cdt_add_request(struct coordinator *cdt, struct cdt_agent_req *new_car);
struct hsm_action_item *hai);
void mdt_cdt_free_request(struct cdt_agent_req *car);
int mdt_cdt_add_request(struct coordinator *cdt, struct cdt_agent_req *new_car);
.hai_cookie = 0,
.hai_gid = 0,
};
.hai_cookie = 0,
.hai_gid = 0,
};
* file is unlinked, file is archived, so create remove request
* for copytool!
* If CDT is not running, requests will be logged for later. */
* file is unlinked, file is archived, so create remove request
* for copytool!
* If CDT is not running, requests will be logged for later. */
- compound_id = atomic_inc_return(&cdt->cdt_compound_id);
if (ma->ma_hsm.mh_arch_id != 0)
archive_id = ma->ma_hsm.mh_arch_id;
else
if (ma->ma_hsm.mh_arch_id != 0)
archive_id = ma->ma_hsm.mh_arch_id;
else
hai.hai_fid = *mdt_object_fid(mo);
hai.hai_fid = *mdt_object_fid(mo);
- rc = mdt_agent_record_add(info->mti_env, info->mti_mdt,
- compound_id, archive_id, 0, &hai);
+ rc = mdt_agent_record_add(info->mti_env, info->mti_mdt, archive_id, 0,
+ &hai);
if (rc)
CERROR("%s: unable to add HSM remove request for "DFID
": rc=%d\n", mdt_obd_name(info->mti_mdt),
if (rc)
CERROR("%s: unable to add HSM remove request for "DFID
": rc=%d\n", mdt_obd_name(info->mti_mdt),