#include <dt_object.h>
#include <md_object.h>
#include <lustre_fid.h>
-#include <range_lock.h>
#define OFD_INIT_OBJID 0
#define OFD_PRECREATE_BATCH_DEFAULT (OBJ_SUBDIR_COUNT * 4)
time64_t ofo_atime_ondisk;
unsigned int ofo_pfid_checking:1,
ofo_pfid_verified:1;
- struct range_lock_tree ofo_write_tree;
};
static inline struct ofd_object *ofd_obj(struct lu_object *o)
struct lfsck_req_local fti_lrl;
struct obd_connect_data fti_ocd;
};
- struct range_lock fti_write_range;
- unsigned fti_range_locked:1;
};
extern void target_recovery_fini(struct obd_device *obd);
enum dt_bufs_type dbt = DT_BUFS_TYPE_WRITE;
int maxlnb = *nr_local;
__u64 begin, end;
- struct range_lock *range = &ofd_info(env)->fti_write_range;
ENTRY;
LASSERT(env != NULL);
obj->ioo_bufcnt,
WRITE);
- /*
- * Reordering precautions: make sure that request processing that
- * was able to receive its bulk data should not get reordered with
- * overlapping BRW requests, e.g.
- * 1) BRW1 sent, bulk data received, but disk I/O delayed
- * 2) BRW1 resent and fully processed
- * 3) the page was unlocked on the client and its writeback bit reset
- * 4) BRW2 sent and fully processed
- * 5) BRW1 processing wakes up and writes stale data to disk
- * If on step 1 bulk data was not received, client resend will invalidate
- * its bulk descriptor and the RPC will be dropped due to failed bulk
- * transfer, which is just fine.
- */
- range_lock_init(range,
- rnb[0].rnb_offset,
- rnb[obj->ioo_bufcnt - 1].rnb_offset +
- rnb[obj->ioo_bufcnt - 1].rnb_len - 1);
- range_lock(&fo->ofo_write_tree, range);
- ofd_info(env)->fti_range_locked = 1;
-
RETURN(0);
err:
bool soft_sync = false;
bool cb_registered = false;
bool fake_write = false;
- struct range_lock *range = &ofd_info(env)->fti_write_range;
ENTRY;
dt_commit_async(env, ofd->ofd_osd);
out:
- if (info->fti_range_locked) {
- range_unlock(&fo->ofo_write_tree, range);
- info->fti_range_locked = 0;
- }
dt_bufs_put(env, o, lnb, niocount);
ofd_object_put(env, fo);
if (granted > 0)