* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
- * Copyright (c) 2011, 2016, Intel Corporation.
+ * Copyright (c) 2011, 2017, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
#include <obd_support.h>
#include <lustre_fid.h>
#include <lustre_dlm.h>
-#include <lustre_ver.h>
#include <lustre_mdc.h>
#include <cl_object.h>
io->u.ci_setattr.sa_parent_fid = lu_object_fid(&obj->co_lu);
again:
+ if (attr->ia_valid & ATTR_FILE)
+ ll_io_set_mirror(io, attr->ia_file);
+
if (cl_io_init(env, io, CIT_SETATTR, io->ci_obj) == 0) {
struct vvp_io *vio = vvp_env_io(env);
result = PTR_ERR(clob);
} else {
result = cl_conf_set(env, lli->lli_clob, &conf);
+ if (result == -EBUSY) {
+ /* ignore the error since I/O will handle it later */
+ result = 0;
+ }
}
cl_env_put(env, &refcheck);
static void cl_object_put_last(struct lu_env *env, struct cl_object *obj)
{
struct lu_object_header *header = obj->co_lu.lo_header;
- wait_queue_t waiter;
+ wait_queue_entry_t waiter;
if (unlikely(atomic_read(&header->loh_ref) != 1)) {
struct lu_site *site = obj->co_lu.lo_dev->ld_site;
- struct lu_site_bkt_data *bkt;
+ wait_queue_head_t *wq;
- bkt = lu_site_bkt_from_fid(site, &header->loh_fid);
+ wq = lu_site_wq_from_fid(site, &header->loh_fid);
init_waitqueue_entry(&waiter, current);
- add_wait_queue(&bkt->lsb_marche_funebre, &waiter);
+ add_wait_queue(wq, &waiter);
while (1) {
set_current_state(TASK_UNINTERRUPTIBLE);
}
set_current_state(TASK_RUNNING);
- remove_wait_queue(&bkt->lsb_marche_funebre, &waiter);
+ remove_wait_queue(wq, &waiter);
}
cl_object_put(env, obj);