* Output of lfs quota has been made less detailed by default,
old (verbose) output can be obtained by using -v option.
+Severity : enhancement
+Bugzilla : 16573
+Description: Export bytes_read/bytes_write count on OSC/OST.
+
Severity : normal
-Bugzila : 16237
+Bugzilla : 16237
Description: Early reply size mismatch, MGC loses connection
Details : Apply the MGS_CONNECT_SUPPORTED mask at reconnect time so
the connect flags are properly negotiated.
Severity : normal
Bugzilla : 16006
-Description: Properly propagate oinfo flags from lov to osc for statfs
+Description: Properly propagate oinfo flags from lov to osc for statfs
Details : restore missing copy oi_flags to lov requests.
Severity : enhancement
Severity : enhancement
Bugzilla : 16091
-Description: configure's --enable-quota should check the
+Description: configure's --enable-quota should check the
: kernel .config for CONFIG_QUOTA
Details : configure is terminated if --enable-quota is passed but
: no quota support is in kernel
Bugzilla : 16080
Description: don't fail open with -ERANGE
Details : if client connected until mds will be know about real ost count
- get LOV EA can be fail because mds not allocate enougth buffer
+ get LOV EA can be fail because mds not allocate enougth buffer
for LOV EA.
Severity : normal
Bugzilla : 15825
Description: Kernel BUG tries to release flock
Details : Lustre does not destroy flock lock before last reference goes
- away. So always drop flock locks when client is evicted and
+ away. So always drop flock locks when client is evicted and
perform unlock regardless of successfulness of speaking to MDS.
Severity : enhancement
Severity : normal
Bugzilla : 15684
-Description: Procfs and llog threads access destoryed import sometimes.
+Description: Procfs and llog threads access destoryed import sometimes.
Details : Sync the import destoryed process with procfs and llog threads by
the import refcount and semaphore.
Severity : minor
Frequency : rare
Bugzilla : 13380
-Description: fix for occasional failure case of -ENOSPC in recovery-small tests
-Details : Move the 'good_osts' check before the 'total_bavail' check. This
- will result in an -EAGAIN and in the exit call path we call
- alloc_rr() which will with increasing aggressiveness attempt to
+Description: fix for occasional failure case of -ENOSPC in recovery-small tests
+Details : Move the 'good_osts' check before the 'total_bavail' check. This
+ will result in an -EAGAIN and in the exit call path we call
+ alloc_rr() which will with increasing aggressiveness attempt to
aquire precreated objects on the minimum number of required OSCs.
Severity : major
Bugzilla : 14326
Description: Use old size assignment to avoid deadlock
Details : This reverts the changes in bugs 2369 and bug 14138 that introduced
- the scheduling while holding a spinlock. We do not need locking
- for size in ll_update_inode() because size is only updated from
- the MDS for directories or files without objects, so there is no
- other place to do the update, and concurrent access to such inodes
+ the scheduling while holding a spinlock. We do not need locking
+ for size in ll_update_inode() because size is only updated from
+ the MDS for directories or files without objects, so there is no
+ other place to do the update, and concurrent access to such inodes
are protected by the inode lock.
Severity : normal
Bugzilla : 14872
Description: the recovery timer never expires
Details : for new client connect request, the recovery timer should not be
- reset, otherwise recovery timer will never expired, if the old
- client never come. Only old client connect and first connection
+ reset, otherwise recovery timer will never expired, if the old
+ client never come. Only old client connect and first connection
req should trigger recovery timer reset.
Severity : normal
Severity : major
Frequency : on network error
Bugzilla : 15027
-Description: panic with double free request if network error
+Description: panic with double free request if network error
Details : mdc_finish_enqueue is finish request if any network error occuring,
- but it's true only for synchronus enqueue, for async enqueue
+ but it's true only for synchronus enqueue, for async enqueue
(via ptlrpcd) this incorrect and ptlrpcd want finish request
himself.
Frequency : rare
Bugzilla : 14421
Description: ASSERTION(!PageDirty(page)) failed
-Details : Wrong check could lead to an assertion failure under specific
+Details : Wrong check could lead to an assertion failure under specific
load patterns.
Severity : normal
Frequency : rare
Bugzilla : 12228
Description: LBUG in ptlrpc_check_set() bad phase ebc0de00
-Details : access to bitfield in structure is always rounded to long
+Details : access to bitfield in structure is always rounded to long
and this produce problem with not atomic change any bit.
Severity : normal
Severity : normal
Bugzilla : 14483
-Description: Detect stride IO mode in read-ahead
+Description: Detect stride IO mode in read-ahead
Details : When a client does stride read, read-ahead should detect that and
- read-ahead pages according to the detected stride pattern.
+ read-ahead pages according to the detected stride pattern.
Severity : normal
Bugzilla : 15033
Severity : normal
Bugzilla : 15198
Description: LDLM soft lockups - improvement
-Details : It is be possible to send the lock handle along with each read
- or write request because the client is already doing a lock match
+Details : It is be possible to send the lock handle along with each read
+ or write request because the client is already doing a lock match
itself so there isn't any reason the OST should have to re-do that
search.
and causing dumpstack.
Details : for every quota slave, at any time, there is only one quota req
is sent to quota master for every uid/gid. Before that quota req
- returns, all the thread relative to the same uid/gid will wait.
+ returns, all the thread relative to the same uid/gid will wait.
So if the quota req is lost because mds failovers or any other
reasons, this bug will be hit. Now, dqacq_interpret() will handle
- quota reqs who time out.
+ quota reqs who time out.
Severity : enhancement
Frequency : always
Frequency : occasional
Bugzilla : 13730
Description: Do not fail import if osc_interpret_create gets -EAGAIN
-Details : If osc_interpret_create got -EAGAIN it immediately exits and
- wakeup oscc_waitq. After wakeup oscc_wait_for_objects call
- oscc_has_objects and see OSC has no objests and call
+Details : If osc_interpret_create got -EAGAIN it immediately exits and
+ wakeup oscc_waitq. After wakeup oscc_wait_for_objects call
+ oscc_has_objects and see OSC has no objests and call
oscc_internal_create to resend create request.
Severity : enhancement
even on a Lustre-patched (server) kernel.
Severity : enhancement
-Bugzilla : 2369
+Bugzilla : 2369
Description: use i_size_read and i_size_write in 2.6 port
Details : replace inode->i_size access with i_size_read/write()
Bugzilla : 12234
Description: /proc/fs/lustre/devices broken on ppc
Details : The patch as applied to 1.6.2 doesn't look correct for all arches.
- We should make sure the type of 'index' is loff_t and then cast
+ We should make sure the type of 'index' is loff_t and then cast
explicitly as needed below. Do not assign an explicitly cast
loff_t to an int.
Bugzilla : 13751
Description: Kernel patches update for RHEL5 2.6.18-8.1.14.el5.
Details : Modify target file & which_patch.
- A flaw was found in the IA32 system call emulation provided
- on AMD64 and Intel 64 platforms. An improperly validated 64-bit
- value could be stored in the %RAX register, which could trigger an
- out-of-bounds system call table access. An untrusted local user
- could exploit this flaw to run code in the kernel
- (ie a root privilege escalation). (CVE-2007-4573).
+ A flaw was found in the IA32 system call emulation provided
+ on AMD64 and Intel 64 platforms. An improperly validated 64-bit
+ value could be stored in the %RAX register, which could trigger an
+ out-of-bounds system call table access. An untrusted local user
+ could exploit this flaw to run code in the kernel
+ (ie a root privilege escalation). (CVE-2007-4573).
Severity : minor
-Bugzilla : 13732
+Bugzilla : 13732
Description: change order of libsysio includes
Details : '#include sysio.h' should always come before '#include xtio.h'
Bugzilla : 13570
Description: To avoid grant space > avaible space when the disk is almost
full. Without this patch you might see the error "grant XXXX >
- available" or some LBUG about grant, when the disk is almost
+ available" or some LBUG about grant, when the disk is almost
full.
Details : In filter_check_grant, for non_grant cache write, we should
- check the left space by if (*left > ungranted + bytes), instead
- of (*left > ungranted), because only we are sure the left space
- is enough for another "bytes", then the ungrant space should be
+ check the left space by if (*left > ungranted + bytes), instead
+ of (*left > ungranted), because only we are sure the left space
+ is enough for another "bytes", then the ungrant space should be
increase. In client, we should update cl_avail_grant only there is
OBD_MD_FLGRANT in the reply.
Severity : enhancement
Bugzilla : 2262
Description: self-adjustable client's lru lists
-Details : use adaptive algorithm for managing client cached locks lru
+Details : use adaptive algorithm for managing client cached locks lru
lists according to current server load, other client's work
- pattern, memory activities, etc. Both, server and client
- side namespaces provide number of proc tunables for controlling
+ pattern, memory activities, etc. Both, server and client
+ side namespaces provide number of proc tunables for controlling
things
Severity : cleanup
Details : rewrite inherited code (uuid parsing code from ext2 utils and
readdir code from ext3) from scratch preserving functionality.
-Severity : normal
+Severity : normal
Bugzilla : 13436
Description: Only those disconnect error should be returned by rq_status.
-Details : In open/enqueue processs, Some errors, which will cause client
- disconnected, should be returned by rq_status, while other
+Details : In open/enqueue processs, Some errors, which will cause client
+ disconnected, should be returned by rq_status, while other
errors should still be returned by intent, then mdc or llite will
detect them.
Severity : enhancement
Bugzilla : 11230
-Description: Tune the kernel for good SCSI performance.
+Description: Tune the kernel for good SCSI performance.
Details : Set the value of /sys/block/{dev}/queue/max_sectors_kb
to the value of /sys/block/{dev}/queue/max_hw_sectors_kb
in mount_lustre.
Bugzilla : 13304
Frequency : Always, for kernels after 2.6.16
Description: Fix warning idr_remove called for id=.. which is not allocated.
-Details : Last kernels save old s_dev before kill super and not allow
+Details : Last kernels save old s_dev before kill super and not allow
to restore from callback - restore it before call kill_anon_super.
Severity : normal
MDS_REINT_UNLINK,
MDS_REINT_RENAME,
MDS_REINT_OPEN,
+ BRW_READ_BYTES,
+ BRW_WRITE_BYTES,
EXTRA_LAST_OPC
};
struct ptlrpc_bulk_desc *rq_bulk; /* client side bulk */
/* client outgoing req */
- time_t rq_sent; /* when request sent, seconds,
+ time_t rq_sent; /* when request sent, seconds,
* or time when request should
* be sent */
volatile time_t rq_deadline; /* when request must finish. volatile
- so that servers' early reply updates to the deadline aren't
+ so that servers' early reply updates to the deadline aren't
kept in per-cpu cache */
int rq_timeout; /* service time estimate (secs) */
return req->rq_rep_swab_mask & (1 << MSG_PTLRPC_HEADER_OFF);
}
-
static inline const char *
ptlrpc_rqphase2str(struct ptlrpc_request *req)
{
struct ptlrpc_thread {
- struct list_head t_link; /* active threads for service, from svc->srv_threads */
+ struct list_head t_link; /* active threads in svc->srv_threads */
void *t_data; /* thread-private data (preallocated memory) */
__u32 t_flags;
__u32 srv_req_portal;
__u32 srv_rep_portal;
-
+
/* AT stuff */
struct adaptive_timeout srv_at_estimate;/* estimated rpc service time */
spinlock_t srv_at_lock;
struct list_head srv_free_rs_list;
/* waitq to run, when adding stuff to srv_free_rs_list */
cfs_waitq_t srv_free_rs_waitq;
-
+
/*
* if non-NULL called during thread creation (ptlrpc_start_thread())
* to initialize service specific per-thread state.
int watchdog_factor,
svc_handler_t, char *name,
cfs_proc_dir_entry_t *proc_entry,
- svcreq_printfn_t,
+ svcreq_printfn_t,
int min_threads, int max_threads,
char *threadname);
void ptlrpc_stop_all_threads(struct ptlrpc_service *svc);
void ptlrpc_daemonize(char *name);
int ptlrpc_service_health_check(struct ptlrpc_service *);
-
struct ptlrpc_svc_data {
char *name;
struct ptlrpc_service *svc;
/* Should only be called once per req */
static inline void ptlrpc_req_drop_rs(struct ptlrpc_request *req)
{
- if (req->rq_reply_state == NULL)
+ if (req->rq_reply_state == NULL)
return; /* shouldn't occur */
ptlrpc_rs_decref(req->rq_reply_state);
req->rq_reply_state = NULL;
ptlrpc_req_set_repsize(struct ptlrpc_request *req, int count, __u32 *lens)
{
int size = lustre_msg_size(req->rq_reqmsg->lm_magic, count, lens);
-
+
req->rq_replen = size + lustre_msg_early_size();
if (req->rq_reqmsg->lm_magic == LUSTRE_MSG_MAGIC_V2)
req->rq_reqmsg->lm_repsize = size;
#ifdef LPROCFS
void ptlrpc_lprocfs_register_obd(struct obd_device *obd);
void ptlrpc_lprocfs_unregister_obd(struct obd_device *obd);
-void ptlrpc_lprocfs_brw(struct ptlrpc_request *req, int opc, int bytes);
+void ptlrpc_lprocfs_brw(struct ptlrpc_request *req, int bytes);
#else
static inline void ptlrpc_lprocfs_register_obd(struct obd_device *obd) {}
static inline void ptlrpc_lprocfs_unregister_obd(struct obd_device *obd) {}
-static inline void ptlrpc_lprocfs_brw(struct ptlrpc_request *req, int opc,
- int bytes) {}
+static inline void ptlrpc_lprocfs_brw(struct ptlrpc_request *req, int bytes) {}
#endif
/* ptlrpc/llog_server.c */
if (cmd == OBD_BRW_READ) {
lprocfs_oh_tally_log2(&cli->cl_read_page_hist, page_count);
lprocfs_oh_tally(&cli->cl_read_rpc_hist, cli->cl_r_in_flight);
- ptlrpc_lprocfs_brw(request, OST_READ, aa->aa_requested_nob);
} else {
lprocfs_oh_tally_log2(&cli->cl_write_page_hist, page_count);
lprocfs_oh_tally(&cli->cl_write_rpc_hist,
cli->cl_w_in_flight);
- ptlrpc_lprocfs_brw(request, OST_WRITE, aa->aa_requested_nob);
}
+ ptlrpc_lprocfs_brw(request, aa->aa_requested_nob);
+
LASSERT(list_empty(&aa->aa_oaps));
if (rc == 0) {
lprocfs_oh_tally(&cli->cl_read_rpc_hist, cli->cl_r_in_flight);
lprocfs_oh_tally_log2(&cli->cl_read_offset_hist,
(starting_offset >> CFS_PAGE_SHIFT) + 1);
- ptlrpc_lprocfs_brw(req, OST_READ, aa->aa_requested_nob);
} else {
lprocfs_oh_tally_log2(&cli->cl_write_page_hist, page_count);
lprocfs_oh_tally(&cli->cl_write_rpc_hist,
cli->cl_w_in_flight);
lprocfs_oh_tally_log2(&cli->cl_write_offset_hist,
(starting_offset >> CFS_PAGE_SHIFT) + 1);
- ptlrpc_lprocfs_brw(req, OST_WRITE, aa->aa_requested_nob);
}
+ ptlrpc_lprocfs_brw(req, aa->aa_requested_nob);
client_obd_list_lock(&cli->cl_loi_list_lock);
RETURN(rc);
}
-
static int osc_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
void *karg, void *uarg)
{
RETURN(0);
}
-
static struct llog_operations osc_size_repl_logops = {
lop_cancel: llog_obd_repl_cancel
};
osfs = lustre_msg_buf(req->rq_repmsg, REPLY_REC_OFF, sizeof(*osfs));
- req->rq_status = obd_statfs(req->rq_export->exp_obd, osfs,
+ req->rq_status = obd_statfs(req->rq_export->exp_obd, osfs,
cfs_time_current_64() - HZ, 0);
if (OBD_FAIL_CHECK_ONCE(OBD_FAIL_OST_ENOSPC))
osfs->os_bfree = osfs->os_bavail = 64;
else
policy.l_extent.end = finis | ~CFS_PAGE_MASK;
- RETURN(ldlm_cli_enqueue_local(exp->exp_obd->obd_namespace, &res_id,
+ RETURN(ldlm_cli_enqueue_local(exp->exp_obd->obd_namespace, &res_id,
LDLM_EXTENT, &policy, LCK_PW, &flags,
ldlm_blocking_ast, ldlm_completion_ast,
ldlm_glimpse_ast, NULL, 0, NULL, lh));
policy.l_extent.end = (nb[nrbufs - 1].offset +
nb[nrbufs - 1].len - 1) | ~CFS_PAGE_MASK;
- RETURN(ldlm_cli_enqueue_local(exp->exp_obd->obd_namespace, &res_id,
+ RETURN(ldlm_cli_enqueue_local(exp->exp_obd->obd_namespace, &res_id,
LDLM_EXTENT, &policy, mode, &flags,
ldlm_blocking_ast, ldlm_completion_ast,
ldlm_glimpse_ast, NULL, 0, NULL, lh));
static void ost_prolong_locks(struct obd_export *exp, struct obd_ioobj *obj,
struct niobuf_remote *nb, struct obdo *oa,
ldlm_mode_t mode)
-
-
{
struct ldlm_res_id res_id = { .name = { obj->ioo_id } };
int nrbufs = obj->ioo_bufcnt;
if (rc != 0)
GOTO(out_bulk, rc);
- /*
+ /*
* If getting the lock took more time than
* client was willing to wait, drop it. b=11330
*/
- if (cfs_time_current_sec() > req->rq_deadline ||
+ if (cfs_time_current_sec() > req->rq_deadline ||
OBD_FAIL_CHECK(OBD_FAIL_OST_DROP_REQ)) {
no_reply = 1;
CERROR("Dropping timed-out read from %s because locking"
if (rc == 0) {
time_t start = cfs_time_current_sec();
do {
- long timeoutl = req->rq_deadline -
+ long timeoutl = req->rq_deadline -
cfs_time_current_sec();
- cfs_duration_t timeout = (timeoutl <= 0 || rc) ?
+ cfs_duration_t timeout = (timeoutl <= 0 || rc) ?
CFS_TICK : cfs_time_seconds(timeoutl);
- lwi = LWI_TIMEOUT_INTERVAL(timeout,
+ lwi = LWI_TIMEOUT_INTERVAL(timeout,
cfs_time_seconds(1),
- ost_bulk_timeout,
+ ost_bulk_timeout,
desc);
- rc = l_wait_event(desc->bd_waitq,
+ rc = l_wait_event(desc->bd_waitq,
!ptlrpc_bulk_active(desc) ||
exp->exp_failed, &lwi);
LASSERT(rc == 0 || rc == -ETIMEDOUT);
/* Wait again if we changed deadline */
- } while ((rc == -ETIMEDOUT) &&
+ } while ((rc == -ETIMEDOUT) &&
(req->rq_deadline > cfs_time_current_sec()));
if (rc == -ETIMEDOUT) {
LASSERT(rc <= 0);
if (rc == 0) {
req->rq_status = nob;
+ ptlrpc_lprocfs_brw(req, nob);
target_committed_to_req(req);
ptlrpc_reply(req);
} else if (!no_reply) {
int rc, swab, i, j;
obd_count client_cksum = 0, server_cksum = 0;
cksum_type_t cksum_type = OBD_CKSUM_CRC32;
- int no_reply = 0;
+ int no_reply = 0;
ENTRY;
if (OBD_FAIL_CHECK(OBD_FAIL_OST_BRW_WRITE_BULK))
if (rc != 0)
GOTO(out_bulk, rc);
- /*
+ /*
* If getting the lock took more time than
* client was willing to wait, drop it. b=11330
*/
- if (cfs_time_current_sec() > req->rq_deadline ||
+ if (cfs_time_current_sec() > req->rq_deadline ||
OBD_FAIL_CHECK(OBD_FAIL_OST_DROP_REQ)) {
no_reply = 1;
CERROR("Dropping timed-out write from %s because locking "
}
/* Because we already sync grant info with client when reconnect,
- * grant info will be cleared for resent req, then fed_grant and
- * total_grant will not be modified in following preprw_write*/
+ * grant info will be cleared for resent req, then fed_grant and
+ * total_grant will not be modified in following preprw_write*/
if (lustre_msg_get_flags(req->rq_reqmsg) & (MSG_RESENT | MSG_REPLAY)) {
DEBUG_REQ(D_CACHE, req, "clear resent/replay req grant info");
body->oa.o_valid &= ~OBD_MD_FLGRANT;
if (rc == 0) {
time_t start = cfs_time_current_sec();
do {
- long timeoutl = req->rq_deadline -
+ long timeoutl = req->rq_deadline -
cfs_time_current_sec();
- cfs_duration_t timeout = (timeoutl <= 0 || rc) ?
+ cfs_duration_t timeout = (timeoutl <= 0 || rc) ?
CFS_TICK : cfs_time_seconds(timeoutl);
lwi = LWI_TIMEOUT_INTERVAL(timeout, cfs_time_seconds(1),
ost_bulk_timeout, desc);
- rc = l_wait_event(desc->bd_waitq,
+ rc = l_wait_event(desc->bd_waitq,
!ptlrpc_bulk_active(desc) ||
desc->bd_export->exp_failed, &lwi);
LASSERT(rc == 0 || rc == -ETIMEDOUT);
/* Wait again if we changed deadline */
- } while ((rc == -ETIMEDOUT) &&
+ } while ((rc == -ETIMEDOUT) &&
(req->rq_deadline > cfs_time_current_sec()));
if (rc == -ETIMEDOUT) {
ost_nio_pages_put(req, local_nb, npages);
if (rc == 0) {
+ int nob = 0;
+
/* set per-requested niobuf return codes */
for (i = j = 0; i < niocount; i++) {
- int nob = remote_nb[i].len;
+ int len = remote_nb[i].len;
+ nob += len;
rcs[i] = 0;
do {
LASSERT(j < npages);
if (local_nb[j].rc < 0)
rcs[i] = local_nb[j].rc;
- nob -= pp_rnb[j].len;
+ len -= pp_rnb[j].len;
j++;
- } while (nob > 0);
- LASSERT(nob == 0);
+ } while (len > 0);
+ LASSERT(len == 0);
}
LASSERT(j == npages);
+ ptlrpc_lprocfs_brw(req, nob);
}
out_lock:
oqctl = lustre_swab_reqbuf(req, REQ_REC_OFF, sizeof(*oqctl),
lustre_swab_obd_quotactl);
- if (oqctl == NULL)
+ if (oqctl == NULL)
RETURN(-EPROTO);
rc = lustre_pack_reply(req, 1, NULL, NULL);
if (oss_num_threads) {
/* If oss_num_threads is set, it is the min and the max. */
- if (oss_num_threads > OSS_THREADS_MAX)
+ if (oss_num_threads > OSS_THREADS_MAX)
oss_num_threads = OSS_THREADS_MAX;
if (oss_num_threads < OSS_THREADS_MIN)
oss_num_threads = OSS_THREADS_MIN;
oss_max_threads = oss_min_threads = oss_num_threads;
} else {
/* Base min threads on memory and cpus */
- oss_min_threads = num_possible_cpus() * num_physpages >>
+ oss_min_threads = num_possible_cpus() * num_physpages >>
(27 - CFS_PAGE_SHIFT);
if (oss_min_threads < OSS_THREADS_MIN)
oss_min_threads = OSS_THREADS_MIN;
/* Insure a 4x range for dynamic threads */
- if (oss_min_threads > OSS_THREADS_MAX / 4)
+ if (oss_min_threads > OSS_THREADS_MAX / 4)
oss_min_threads = OSS_THREADS_MAX / 4;
oss_max_threads = min(OSS_THREADS_MAX, oss_min_threads * 4);
}
ost->ost_service =
ptlrpc_init_svc(OST_NBUFS, OST_BUFSIZE, OST_MAXREQSIZE,
OST_MAXREPSIZE, OST_REQUEST_PORTAL,
- OSC_REPLY_PORTAL, OSS_SERVICE_WATCHDOG_FACTOR,
+ OSC_REPLY_PORTAL, OSS_SERVICE_WATCHDOG_FACTOR,
ost_handle, LUSTRE_OSS_NAME,
obd->obd_proc_entry, target_print_req,
oss_min_threads, oss_max_threads, "ll_ost");
oss_num_create_threads = OSS_MAX_CREATE_THREADS;
if (oss_num_create_threads < OSS_DEF_CREATE_THREADS)
oss_num_create_threads = OSS_DEF_CREATE_THREADS;
- oss_min_create_threads = oss_max_create_threads =
+ oss_min_create_threads = oss_max_create_threads =
oss_num_create_threads;
} else {
oss_min_create_threads = OSS_DEF_CREATE_THREADS;
ost->ost_io_service =
ptlrpc_init_svc(OST_NBUFS, OST_BUFSIZE, OST_MAXREQSIZE,
OST_MAXREPSIZE, OST_IO_PORTAL,
- OSC_REPLY_PORTAL, OSS_SERVICE_WATCHDOG_FACTOR,
+ OSC_REPLY_PORTAL, OSS_SERVICE_WATCHDOG_FACTOR,
ost_handle, "ost_io",
obd->obd_proc_entry, target_print_req,
oss_min_threads, oss_max_threads, "ll_ost_io");
.o_health_check = ost_health_check,
};
-
static int __init ost_init(void)
{
struct lprocfs_static_vars lvars;
{ MDS_REINT_UNLINK, "mds_reint_unlink" },
{ MDS_REINT_RENAME, "mds_reint_rename" },
{ MDS_REINT_OPEN, "mds_reint_open" },
+ { BRW_READ_BYTES, "read_bytes" },
+ { BRW_WRITE_BYTES, "write_bytes" },
};
const char *ll_opcode2str(__u32 opcode)
lprocfs_counter_init(svc_stats, PTLRPC_REQBUF_AVAIL_CNTR,
svc_counter_config, "reqbuf_avail", "bufs");
for (i = 0; i < EXTRA_LAST_OPC; i++) {
+ char *units;
+
+ switch(i) {
+ case BRW_WRITE_BYTES:
+ case BRW_READ_BYTES:
+ units = "bytes";
+ break;
+ default:
+ units = "reqs";
+ break;
+ }
lprocfs_counter_init(svc_stats, PTLRPC_LAST_CNTR + i,
svc_counter_config,
- ll_eopcode2str(i), "reqs");
+ ll_eopcode2str(i), units);
}
for (i = 0; i < LUSTRE_MAX_OPCODES; i++) {
__u32 opcode = ll_rpc_opcode_table[i].opcode;
* parser. Currently I only print stuff here I know is OK
* to look at coz it was set up in request_in_callback()!!! */
seq_printf(s, LPD64":%s:%s:x"LPD64":%d:%s:%ld:%lds(%+lds) ",
- req->rq_history_seq, libcfs_nid2str(req->rq_self),
- libcfs_id2str(req->rq_peer), req->rq_xid,
+ req->rq_history_seq, libcfs_nid2str(req->rq_self),
+ libcfs_id2str(req->rq_peer), req->rq_xid,
req->rq_reqlen, ptlrpc_rqphase2str(req),
req->rq_arrival_time.tv_sec,
req->rq_sent - req->rq_arrival_time.tv_sec,
rc += snprintf(page + rc, count - rc,
"adaptive timeouts off, using obd_timeout %u\n",
obd_timeout);
- rc += snprintf(page + rc, count - rc,
+ rc += snprintf(page + rc, count - rc,
"%10s : cur %3u worst %3u (at %ld, "DHMS_FMT" ago) ",
- "service", cur, worst, worstt,
+ "service", cur, worst, worstt,
DHMS_VARS(&ts));
rc = lprocfs_at_hist_helper(page, count, rc,
&svc->srv_at_estimate);
return rc;
-}
+}
void ptlrpc_lprocfs_register_service(struct proc_dir_entry *entry,
struct ptlrpc_service *svc)
if (svc_stats == NULL || opc <= 0)
return;
LASSERT(opc < LUSTRE_MAX_OPCODES);
- /* These two use the ptlrpc_lprocfs_brw below */
- if (!(opc == OST_WRITE || opc == OST_READ || op == LDLM_ENQUEUE
- || op == MDS_REINT))
+ if (!(op == LDLM_ENQUEUE || op == MDS_REINT))
lprocfs_counter_add(svc_stats, opc + EXTRA_MAX_OPCODES, 0);
}
-void ptlrpc_lprocfs_brw(struct ptlrpc_request *req, int opc, int bytes)
+void ptlrpc_lprocfs_brw(struct ptlrpc_request *req, int bytes)
{
struct lprocfs_stats *svc_stats;
+ int idx;
+
+ if (!req->rq_import)
+ return;
svc_stats = req->rq_import->imp_obd->obd_svc_stats;
- if (!svc_stats)
+ if (!svc_stats)
return;
- lprocfs_counter_add(svc_stats, opc + EXTRA_MAX_OPCODES, bytes);
+ idx = lustre_msg_get_opc(req->rq_reqmsg);
+ switch (idx) {
+ case OST_READ:
+ idx = BRW_READ_BYTES + PTLRPC_LAST_CNTR;
+ break;
+ case OST_WRITE:
+ idx = BRW_WRITE_BYTES + PTLRPC_LAST_CNTR;
+ break;
+ default:
+ LASSERTF(0, "unsupported opcode %u\n", idx);
+ break;
+ }
+
+ lprocfs_counter_add(svc_stats, idx, bytes);
}
+
EXPORT_SYMBOL(ptlrpc_lprocfs_brw);
void ptlrpc_lprocfs_unregister_service(struct ptlrpc_service *svc)
{
- if (svc->srv_procroot != NULL)
+ if (svc->srv_procroot != NULL)
lprocfs_remove(&svc->srv_procroot);
- if (svc->srv_stats)
+ if (svc->srv_stats)
lprocfs_free_stats(&svc->srv_stats);
}
struct obd_device *obd = data;
char tmpbuf[sizeof(struct obd_uuid)];
- /* Kludge code(deadlock situation): the lprocfs lock has been held
+ /* Kludge code(deadlock situation): the lprocfs lock has been held
* since the client is evicted by writting client's
- * uuid/nid to procfs "evict_client" entry. However,
+ * uuid/nid to procfs "evict_client" entry. However,
* obd_export_evict_by_uuid() will call lprocfs_remove() to destroy
* the proc entries under the being destroyed export{}, so I have
- * to drop the lock at first here.
+ * to drop the lock at first here.
* - jay, jxiong@clusterfs.com */
class_incref(obd);
LPROCFS_EXIT();
run_test 24d "mkdir .../R4/{f,g}; rename .../R4/f .../R4/g ====="
test_24e() {
- echo '-- cross directory renames --'
+ echo '-- cross directory renames --'
mkdir $DIR/R5{a,b}
touch $DIR/R5a/f
mv $DIR/R5a/f $DIR/R5b/g
$CHECKSTAT -a $DIR/R10/f || error
$CHECKSTAT -a $DIR/R10/g || error
}
-run_test 24j "source does not exist ============================"
+run_test 24j "source does not exist ============================"
test_24k() {
mkdir $DIR/R11a $DIR/R11a/d
test_32a() {
echo "== more mountpoints and symlinks ================="
[ -e $DIR/d32a ] && rm -fr $DIR/d32a
- mkdir -p $DIR/d32a/ext2-mountpoint
+ mkdir -p $DIR/d32a/ext2-mountpoint
mount -t ext2 -o loop $EXT2_DEV $DIR/d32a/ext2-mountpoint || error
- $CHECKSTAT -t dir $DIR/d32a/ext2-mountpoint/.. || error
+ $CHECKSTAT -t dir $DIR/d32a/ext2-mountpoint/.. || error
$UMOUNT $DIR/d32a/ext2-mountpoint || error
}
run_test 32a "stat d32a/ext2-mountpoint/.. ====================="
test_32b() {
[ -e $DIR/d32b ] && rm -fr $DIR/d32b
- mkdir -p $DIR/d32b/ext2-mountpoint
+ mkdir -p $DIR/d32b/ext2-mountpoint
mount -t ext2 -o loop $EXT2_DEV $DIR/d32b/ext2-mountpoint || error
ls -al $DIR/d32b/ext2-mountpoint/.. || error
$UMOUNT $DIR/d32b/ext2-mountpoint || error
}
run_test 32b "open d32b/ext2-mountpoint/.. ====================="
-
+
test_32c() {
[ -e $DIR/d32c ] && rm -fr $DIR/d32c
- mkdir -p $DIR/d32c/ext2-mountpoint
+ mkdir -p $DIR/d32c/ext2-mountpoint
mount -t ext2 -o loop $EXT2_DEV $DIR/d32c/ext2-mountpoint || error
- mkdir -p $DIR/d32c/d2/test_dir
+ mkdir -p $DIR/d32c/d2/test_dir
$CHECKSTAT -t dir $DIR/d32c/ext2-mountpoint/../d2/test_dir || error
$UMOUNT $DIR/d32c/ext2-mountpoint || error
}
test_32d() {
[ -e $DIR/d32d ] && rm -fr $DIR/d32d
- mkdir -p $DIR/d32d/ext2-mountpoint
+ mkdir -p $DIR/d32d/ext2-mountpoint
mount -t ext2 -o loop $EXT2_DEV $DIR/d32d/ext2-mountpoint || error
- mkdir -p $DIR/d32d/d2/test_dir
+ mkdir -p $DIR/d32d/d2/test_dir
ls -al $DIR/d32d/ext2-mountpoint/../d2/test_dir || error
$UMOUNT $DIR/d32d/ext2-mountpoint || error
}
test_32e() {
[ -e $DIR/d32e ] && rm -fr $DIR/d32e
- mkdir -p $DIR/d32e/tmp
- TMP_DIR=$DIR/d32e/tmp
- ln -s $DIR/d32e $TMP_DIR/symlink11
- ln -s $TMP_DIR/symlink11 $TMP_DIR/../symlink01
+ mkdir -p $DIR/d32e/tmp
+ TMP_DIR=$DIR/d32e/tmp
+ ln -s $DIR/d32e $TMP_DIR/symlink11
+ ln -s $TMP_DIR/symlink11 $TMP_DIR/../symlink01
$CHECKSTAT -t link $DIR/d32e/tmp/symlink11 || error
$CHECKSTAT -t link $DIR/d32e/symlink01 || error
}
test_32f() {
[ -e $DIR/d32f ] && rm -fr $DIR/d32f
- mkdir -p $DIR/d32f/tmp
- TMP_DIR=$DIR/d32f/tmp
- ln -s $DIR/d32f $TMP_DIR/symlink11
- ln -s $TMP_DIR/symlink11 $TMP_DIR/../symlink01
+ mkdir -p $DIR/d32f/tmp
+ TMP_DIR=$DIR/d32f/tmp
+ ln -s $DIR/d32f $TMP_DIR/symlink11
+ ln -s $TMP_DIR/symlink11 $TMP_DIR/../symlink01
ls $DIR/d32f/tmp/symlink11 || error
ls $DIR/d32f/symlink01 || error
}
run_test 32f "open d32f/symlink->tmp/symlink->lustre-subdir ===="
test_32g() {
- TMP_DIR=$DIR/$tdir/tmp
+ TMP_DIR=$DIR/$tdir/tmp
mkdir -p $TMP_DIR $DIR/${tdir}2
- ln -s $DIR/${tdir}2 $TMP_DIR/symlink12
- ln -s $TMP_DIR/symlink12 $TMP_DIR/../symlink02
+ ln -s $DIR/${tdir}2 $TMP_DIR/symlink12
+ ln -s $TMP_DIR/symlink12 $TMP_DIR/../symlink02
$CHECKSTAT -t link $TMP_DIR/symlink12 || error
$CHECKSTAT -t link $DIR/$tdir/symlink02 || error
$CHECKSTAT -t dir -f $TMP_DIR/symlink12 || error
test_32h() {
rm -fr $DIR/$tdir $DIR/${tdir}2
- TMP_DIR=$DIR/$tdir/tmp
- mkdir -p $TMP_DIR $DIR/${tdir}2
- ln -s $DIR/${tdir}2 $TMP_DIR/symlink12
- ln -s $TMP_DIR/symlink12 $TMP_DIR/../symlink02
+ TMP_DIR=$DIR/$tdir/tmp
+ mkdir -p $TMP_DIR $DIR/${tdir}2
+ ln -s $DIR/${tdir}2 $TMP_DIR/symlink12
+ ln -s $TMP_DIR/symlink12 $TMP_DIR/../symlink02
ls $TMP_DIR/symlink12 || error
ls $DIR/$tdir/symlink02 || error
}
test_32i() {
[ -e $DIR/d32i ] && rm -fr $DIR/d32i
- mkdir -p $DIR/d32i/ext2-mountpoint
+ mkdir -p $DIR/d32i/ext2-mountpoint
mount -t ext2 -o loop $EXT2_DEV $DIR/d32i/ext2-mountpoint || error
touch $DIR/d32i/test_file
- $CHECKSTAT -t file $DIR/d32i/ext2-mountpoint/../test_file || error
+ $CHECKSTAT -t file $DIR/d32i/ext2-mountpoint/../test_file || error
$UMOUNT $DIR/d32i/ext2-mountpoint || error
}
run_test 32i "stat d32i/ext2-mountpoint/../test_file ==========="
test_32j() {
[ -e $DIR/d32j ] && rm -fr $DIR/d32j
- mkdir -p $DIR/d32j/ext2-mountpoint
+ mkdir -p $DIR/d32j/ext2-mountpoint
mount -t ext2 -o loop $EXT2_DEV $DIR/d32j/ext2-mountpoint || error
touch $DIR/d32j/test_file
cat $DIR/d32j/ext2-mountpoint/../test_file || error
test_32k() {
rm -fr $DIR/d32k
- mkdir -p $DIR/d32k/ext2-mountpoint
- mount -t ext2 -o loop $EXT2_DEV $DIR/d32k/ext2-mountpoint
+ mkdir -p $DIR/d32k/ext2-mountpoint
+ mount -t ext2 -o loop $EXT2_DEV $DIR/d32k/ext2-mountpoint
mkdir -p $DIR/d32k/d2
touch $DIR/d32k/d2/test_file || error
$CHECKSTAT -t file $DIR/d32k/ext2-mountpoint/../d2/test_file || error
test_32l() {
rm -fr $DIR/d32l
- mkdir -p $DIR/d32l/ext2-mountpoint
+ mkdir -p $DIR/d32l/ext2-mountpoint
mount -t ext2 -o loop $EXT2_DEV $DIR/d32l/ext2-mountpoint || error
mkdir -p $DIR/d32l/d2
touch $DIR/d32l/d2/test_file
test_32m() {
rm -fr $DIR/d32m
- mkdir -p $DIR/d32m/tmp
- TMP_DIR=$DIR/d32m/tmp
- ln -s $DIR $TMP_DIR/symlink11
- ln -s $TMP_DIR/symlink11 $TMP_DIR/../symlink01
+ mkdir -p $DIR/d32m/tmp
+ TMP_DIR=$DIR/d32m/tmp
+ ln -s $DIR $TMP_DIR/symlink11
+ ln -s $TMP_DIR/symlink11 $TMP_DIR/../symlink01
$CHECKSTAT -t link $DIR/d32m/tmp/symlink11 || error
$CHECKSTAT -t link $DIR/d32m/symlink01 || error
}
test_32n() {
rm -fr $DIR/d32n
- mkdir -p $DIR/d32n/tmp
- TMP_DIR=$DIR/d32n/tmp
- ln -s $DIR $TMP_DIR/symlink11
- ln -s $TMP_DIR/symlink11 $TMP_DIR/../symlink01
+ mkdir -p $DIR/d32n/tmp
+ TMP_DIR=$DIR/d32n/tmp
+ ln -s $DIR $TMP_DIR/symlink11
+ ln -s $TMP_DIR/symlink11 $TMP_DIR/../symlink01
ls -l $DIR/d32n/tmp/symlink11 || error
ls -l $DIR/d32n/symlink01 || error
}
test_32o() {
rm -fr $DIR/d32o $DIR/$tfile
- touch $DIR/$tfile
- mkdir -p $DIR/d32o/tmp
- TMP_DIR=$DIR/d32o/tmp
- ln -s $DIR/$tfile $TMP_DIR/symlink12
- ln -s $TMP_DIR/symlink12 $TMP_DIR/../symlink02
+ touch $DIR/$tfile
+ mkdir -p $DIR/d32o/tmp
+ TMP_DIR=$DIR/d32o/tmp
+ ln -s $DIR/$tfile $TMP_DIR/symlink12
+ ln -s $TMP_DIR/symlink12 $TMP_DIR/../symlink02
$CHECKSTAT -t link $DIR/d32o/tmp/symlink12 || error
$CHECKSTAT -t link $DIR/d32o/symlink02 || error
$CHECKSTAT -t file -f $DIR/d32o/tmp/symlink12 || error
log 32p_2
rm -f $DIR/$tfile
log 32p_3
- touch $DIR/$tfile
+ touch $DIR/$tfile
log 32p_4
- mkdir -p $DIR/d32p/tmp
+ mkdir -p $DIR/d32p/tmp
log 32p_5
- TMP_DIR=$DIR/d32p/tmp
+ TMP_DIR=$DIR/d32p/tmp
log 32p_6
- ln -s $DIR/$tfile $TMP_DIR/symlink12
+ ln -s $DIR/$tfile $TMP_DIR/symlink12
log 32p_7
- ln -s $TMP_DIR/symlink12 $TMP_DIR/../symlink02
+ ln -s $TMP_DIR/symlink12 $TMP_DIR/../symlink02
log 32p_8
cat $DIR/d32p/tmp/symlink12 || error
log 32p_9
run_test 34b "O_RDONLY opening file doesn't create objects ====="
test_34c() {
- [ ! -f $DIR/f34 ] && test_34a
+ [ ! -f $DIR/f34 ] && test_34a
$CHECKSTAT -s $TEST_34_SIZE $DIR/f34 || error
$OPENFILE -f O_RDWR $DIR/f34
$GETSTRIPE $DIR/f34 2>&1 | grep -q "no stripe info" && error
run_test 34c "O_RDWR opening file-with-size works =============="
test_34d() {
- [ ! -f $DIR/f34 ] && test_34a
+ [ ! -f $DIR/f34 ] && test_34a
dd if=/dev/zero of=$DIR/f34 conv=notrunc bs=4k count=1 || error
$CHECKSTAT -s $TEST_34_SIZE $DIR/f34 || error
rm $DIR/f34
function get_times() {
FILE=$1
TIME=$2
-
+
i=0
for time in `stat -c "%X %Y %Z" $FILE`; do
eval "$TIME[$i]=$time"
get_times $DIR/$tdir/flink LINK_NEW
get_times $DIR/$tdir/funlink UNLINK_NEW
get_times $DIR/$tdir/frename RENAME_NEW
-
+
cat $DIR/$tdir/fopen > /dev/null
ln $DIR/$tdir/flink $DIR/$tdir/flink2
rm -f $DIR/$tdir/funlink2
echo ${UNLINK_OLD[1]},${UNLINK_NEW[$MTIME]},${UNLINK_NEW2[$MTIME]}
echo ${RENAME_OLD[1]},${RENAME_NEW[$MTIME]},${RENAME_NEW2[$MTIME]}
-
+
[ ${OPEN_NEW2[$MTIME]} -eq ${OPEN_NEW[$MTIME]} ] || \
error "open file reverses mtime"
[ ${LINK_NEW2[$MTIME]} -eq ${LINK_NEW[$MTIME]} ] || \
# in a 2 stripe file (lov.sh), page 1023 maps to page 511 in its object. this
# test tickles a bug where re-dirtying a page was failing to be mapped to the
-# objects offset and an assert hit when an rpc was built with 1023's mapped
+# objects offset and an assert hit when an rpc was built with 1023's mapped
# offset 511 and 511's raw 511 offset. it also found general redirtying bugs.
test_46() {
f="$DIR/f46"
error "OST $N has less objects vs OST $NLAST (${OBJS[$N]} < ${OBJS[$NLAST]}"
[ ${OBJS[$N]} -gt $((${OBJS[$NLAST]} + 20)) ] && \
error "OST $N has less objects vs OST $NLAST (${OBJS[$N]} < ${OBJS[$NLAST]}"
-
+
[ ${OBJS0[$N]} -lt $((${OBJS0[$NLAST]} - 20)) ] && \
error "OST $N has less #0 objects vs OST $NLAST (${OBJS0[$N]} < ${OBJS0[$NLAST]}"
[ ${OBJS0[$N]} -gt $((${OBJS0[$NLAST]} + 20)) ] && \
f="$DIR/f54b"
mknod $f c 1 3
chmod 0666 $f
- dd if=/dev/zero of=$f bs=`page_size` count=1
+ dd if=/dev/zero of=$f bs=`page_size` count=1
}
run_test 54b "char device works in lustre ======================"
tdir="$DIR/d54c"
loopdev="$DIR/loop54c"
- find_loop_dev
+ find_loop_dev
[ -z "$LOOPNUM" ] && echo "couldn't find empty loop device" && return
mknod $loopdev b 7 $LOOPNUM
echo "make a loop file system with $tfile on $loopdev ($LOOPNUM)..."
remote_mds && skip "remote MDS" && return
local MNTDEV="mds.*.mntdev"
DEV=$(lctl get_param -n $MNTDEV)
- [ -z "$DEV" ] && error "can't access $MNTDEV"
+ [ -z "$DEV" ] && error "can't access $MNTDEV"
for DEV in `lctl get_param -n $MNTDEV`; do
dumpe2fs -h $DEV > $TMP/t57a.dump || error "can't access $DEV"
DEVISIZE=`awk '/Inode size:/ { print $3 }' $TMP/t57a.dump`
run_test 60b "limit repeated messages from CERROR/CWARN ========"
test_60c() {
- echo "create 5000 files"
+ echo "create 5000 files"
createmany -o $DIR/f60c- 5000
#define OBD_FAIL_MDS_LLOG_CREATE_FAILED 0x137
lctl set_param fail_loc=0x80000137
"`$GETSTRIPE -v $DIR/d65/dd1 | grep "^count"`" ] || error "stripe info inherit failed"
}
run_test 65h "directory stripe info inherit ===================="
-
+
test_65i() { # bug6367
- $SETSTRIPE $MOUNT -s 65536 -c -1
+ $SETSTRIPE $MOUNT -s 65536 -c -1
}
run_test 65i "set non-default striping on root directory (bug 6367)="
# bug 3462 - multiple simultaneous MDC requests
test_73() {
- mkdir $DIR/d73-1
+ mkdir $DIR/d73-1
mkdir $DIR/d73-2
multiop_bg_pause $DIR/d73-1/f73-1 O_c || return 1
pid1=$!
sleep 25
$CHECKSTAT -t file $DIR/d73-1/f73-1 || return 4
- $CHECKSTAT -t file $DIR/d73-1/f73-2 || return 5
- $CHECKSTAT -t file $DIR/d73-2/f73-3 || return 6
+ $CHECKSTAT -t file $DIR/d73-1/f73-2 || return 5
+ $CHECKSTAT -t file $DIR/d73-2/f73-3 || return 6
rm -rf $DIR/d73-*
}
test75_prep() {
[ $T75_PREP = "yes" ] && return
echo "using F75=$F75, F128k=$F128k, FHEAD=$FHEAD, FTAIL=$FTAIL"
-
+
dd if=/dev/urandom of=${F75}_128k bs=128k count=1 || error "dd failed"
log "finished dd"
chmod 777 ${F128k}
T75_PREP=yes
}
-
+
test_75a() {
test75_prep
-
+
cp -p ${F128k} ${FHEAD}
log "finished cp to $FHEAD"
cp -p ${F128k} ${FTAIL}
log "finished cp to $FTAIL"
cat ${F128k} ${F128k} > ${F75}_sim_sim
-
+
$JOIN ${FHEAD} ${FTAIL} || error "join ${FHEAD} ${FTAIL} error"
log "finished join $FHEAD to ${F75}_sim_sim"
cmp ${FHEAD} ${F75}_sim_sim || error "${FHEAD} ${F75}_sim_sim differ"
$CHECKSTAT -a ${FTAIL} || error "tail ${FTAIL} still exist after join"
}
run_test 75a "TEST join file ===================================="
-
+
test_75b() {
test75_prep
-
+
cp -p ${F128k} ${FTAIL}
cat ${F75}_sim_sim >> ${F75}_join_sim
cat ${F128k} >> ${F75}_join_sim
$CHECKSTAT -a ${FTAIL} || error "tail ${FTAIL} exist after join"
}
run_test 75b "TEST join file 2 =================================="
-
+
test_75c() {
test75_prep
-
+
cp -p ${F128k} ${FTAIL}
cat ${F128k} >> ${F75}_sim_join
cat ${F75}_join_sim >> ${F75}_sim_join
$CHECKSTAT -a ${FHEAD} || error "tail ${FHEAD} exist after join"
}
run_test 75c "TEST join file 3 =================================="
-
+
test_75d() {
test75_prep
-
+
cp -p ${F128k} ${FHEAD}
cp -p ${F128k} ${FHEAD}_tmp
cat ${F75}_sim_sim >> ${F75}_join_join
$CHECKSTAT -a ${FTAIL} || error "tail ${FTAIL} exist after join (2)"
}
run_test 75d "TEST join file 4 =================================="
-
+
test_75e() {
test75_prep
-
+
rm -rf ${FHEAD} || "delete join file error"
}
run_test 75e "TEST join file 5 (remove joined file) ============="
-
+
test_75f() {
test75_prep
-
+
cp -p ${F128k} ${F75}_join_10_compare
cp -p ${F128k} ${F75}_join_10
for ((i = 0; i < 10; i++)); do
error "files ${F75}_join_10 ${F75}_join_10_compare differ"
}
run_test 75f "TEST join file 6 (join 10 files) =================="
-
+
test_75g() {
[ ! -f ${F75}_join_10 ] && echo "${F75}_join_10 missing" && return
$LFS getstripe ${F75}_join_10
-
+
$OPENUNLINK ${F75}_join_10 ${F75}_join_10 || error "files unlink open"
-
+
ls -l $F75*
}
run_test 75g "TEST join file 7 (open unlink) ===================="
run_test 77b "checksum error on client write ===================="
test_77c() { # bug 10889
- [ ! -f $DIR/f77b ] && skip "requires 77b - skipping" && return
+ [ ! -f $DIR/f77b ] && skip "requires 77b - skipping" && return
set_checksums 1
for algo in $CKSUM_TYPES; do
cancel_lru_locks osc
run_test 77d "checksum error on OST direct write ==============="
test_77e() { # bug 10889
- [ ! -f $DIR/f77 ] && skip "requires 77d - skipping" && return
+ [ ! -f $DIR/f77 ] && skip "requires 77d - skipping" && return
#define OBD_FAIL_OSC_CHECKSUM_RECEIVE 0x408
lctl set_param fail_loc=0x80000408
set_checksums 1
test_77h() { # bug 10889
[ $(lctl get_param -n devices | grep -c obdfilter) -eq 0 ] && \
skip "remote OST" && return
- [ ! -f $DIR/f77g ] && skip "requires 77g - skipping" && return
+ [ ! -f $DIR/f77g ] && skip "requires 77g - skipping" && return
cancel_lru_locks osc
#define OBD_FAIL_OST_CHECKSUM_SEND 0x21b
lctl set_param fail_loc=0x8000021b
ALLOWANCE=$((64 * $OSTCOUNT))
- if [ $DFTOTAL -lt $(($BKTOTAL - $ALLOWANCE)) ] ||
+ if [ $DFTOTAL -lt $(($BKTOTAL - $ALLOWANCE)) ] ||
[ $DFTOTAL -gt $(($BKTOTAL + $ALLOWANCE)) ] ; then
error "df total($DFTOTAL) mismatch OST total($BKTOTAL)"
fi
- if [ $DFFREE -lt $(($BKFREE - $ALLOWANCE)) ] ||
+ if [ $DFFREE -lt $(($BKFREE - $ALLOWANCE)) ] ||
[ $DFFREE -gt $(($BKFREE + $ALLOWANCE)) ] ; then
error "df free($DFFREE) mismatch OST free($BKFREE)"
fi
- if [ $DFAVAIL -lt $(($BKAVAIL - $ALLOWANCE)) ] ||
+ if [ $DFAVAIL -lt $(($BKAVAIL - $ALLOWANCE)) ] ||
[ $DFAVAIL -gt $(($BKAVAIL + $ALLOWANCE)) ] ; then
error "df avail($DFAVAIL) mismatch OST avail($BKAVAIL)"
fi
if [ $(($discard * 10)) -gt $nreads ] ;then
lctl get_param osc.*.rpc_stats
lctl get_param llite.*.read_ahead_stats
- error "too many ($discard) discarded pages"
+ error "too many ($discard) discarded pages"
fi
rm -f $DIR/$tfile || true
}
local ITERATION=$((FILE_LENGTH/STRIDE_SIZE))
# prepare the read-ahead file
setup_test101
- cancel_lru_locks osc
+ cancel_lru_locks osc
for BIDX in 2 4 8 16 32 64 128 256
do
local BSIZE=$((BIDX*4096))
[ "$SETUP_TEST102" = "yes" ] && return
mkdir -p $DIR/$tdir
STRIPE_SIZE=65536
- STRIPE_COUNT=4
+ STRIPE_COUNT=4
STRIPE_OFFSET=2
trap cleanup_test102 EXIT
cd $DIR
$SETSTRIPE $tdir -s $STRIPE_SIZE -i $STRIPE_OFFSET -c $STRIPE_COUNT
- cd $DIR/$tdir
+ cd $DIR/$tdir
for num in 1 2 3 4
do
for count in 1 2 3 4
do
- for offset in 0 1 2 3
+ for offset in 0 1 2 3
do
local stripe_size=`expr $STRIPE_SIZE \* $num`
local file=file"$num-$offset-$count"
done
cd $DIR
- star -c f=$TMP/f102.tar $tdir
+ star -c f=$TMP/f102.tar $tdir
SETUP_TEST102=yes
}
setfattr -n trusted.name1 -v value1 $testfile || error
[ "`getfattr -n trusted.name1 $testfile 2> /dev/null | \
grep "trusted.name1"`" == "trusted.name1=\"value1\"" ] || error
-
+
setfattr -n user.author1 -v author1 $testfile || error
[ "`getfattr -n user.author1 $testfile 2> /dev/null | \
grep "user.author1"`" == "user.author1=\"author1\"" ] || error
[ `getfattr -d -m "^trusted" $testfile 2> /dev/null | \
grep "trusted.name" | wc -l` -eq 3 ] || error
-
+
setfattr -n user.author2 -v author2 $testfile || error
setfattr -n user.author3 -v author3 $testfile || error
[ `getfattr -d -m "^user" $testfile 2> /dev/null | \
do
for count in 1 2 3 4
do
- for offset in 0 1 2 3
+ for offset in 0 1 2 3
do
local size=`expr $STRIPE_SIZE \* $num`
local file=file"$num-$offset-$count"
local tmp_file=out
- $GETSTRIPE -v $file > $tmp_file
+ $GETSTRIPE -v $file > $tmp_file
get_stripe_info $tmp_file
if test $stripe_size -ne $size
then
do
for count in 1 2 3 4
do
- for offset in 0 1 2 3
+ for offset in 0 1 2 3
do
local size=`expr $STRIPE_SIZE \* $num`
local file=file"$num-$offset-$count"
test_102d() {
# b10930: star test for trusted.lov xattr
- star --xhelp 2>&1 | grep -q nolustre
+ star --xhelp 2>&1 | grep -q nolustre
if [ $? -ne 0 ]
then
skip "being skipped because a lustre-aware star is not installed." && return
test_102e() {
# b10930: star test for trusted.lov xattr
- star --xhelp 2>&1 | grep -q nolustre
+ star --xhelp 2>&1 | grep -q nolustre
[ $? -ne 0 ] && skip "lustre-aware star is not installed" && return
[ "$OSTCOUNT" -lt "4" ] && skip "skipping 4-stripe test" && return
setup_test102
test_102f() {
# b10930: star test for trusted.lov xattr
- star --xhelp 2>&1 | grep -q nolustre
+ star --xhelp 2>&1 | grep -q nolustre
[ $? -ne 0 ] && skip "lustre-aware star is not installed" && return
[ "$OSTCOUNT" -lt "4" ] && skip "skipping 4-stripe test" && return
setup_test102
test_102g() {
# b10930: star test for trusted.lov xattr
- star --xhelp 2>&1 | grep -q nolustre
+ star --xhelp 2>&1 | grep -q nolustre
[ $? -ne 0 ] && skip "lustre-aware star is not installed" && return
[ "$OSTCOUNT" -lt "4" ] && skip "skipping 4-stripe test" && return
setup_test102
MINV=${AVAIL[i]}; MINI=$i
fi
done
- echo Min free space: OST $MINI: $MINV
- echo Max free space: OST $MAXI: $MAXV
+ echo Min free space: OST $MINI: $MINV
+ echo Max free space: OST $MAXI: $MAXV
}
test_116() {
free_min_max
DIFF2=$(($MAXV - $MINV))
echo "free space delta: orig $DIFF final $DIFF2"
- [ $DIFF2 -gt $DIFF ] && echo "delta got worse!"
+ [ $DIFF2 -gt $DIFF ] && echo "delta got worse!"
DIFF=$(($MINV1 - ${AVAIL[$MINI1]}))
echo "Wrote $DIFF to smaller OST $MINI1"
DIFF2=$(($MAXV1 - ${AVAIL[$MAXI1]}))
echo "Wrote $DIFF2 to larger OST $MAXI1"
[ $DIFF -gt 0 ] && echo "Wrote $(($DIFF2 * 100 / $DIFF - 100))% more data to larger OST $MAXI1"
- # Figure out which files were written where
+ # Figure out which files were written where
UUID=$(lctl get_param -n lov.${FSNAME}-clilov-*.target_obd | awk '/'$MINI1': / {print $2; exit}')
echo $UUID
MINC=$($GETSTRIPE --obd $UUID $DIR/$tdir | wc -l)
fi
lctl set_param fail_loc=0x0
-
+
LOCKED=$(lctl get_param -n "llite.*.dump_page_cache" | grep -c locked)
DIRTY=$(lctl get_param -n "llite.*.dump_page_cache" | grep -c dirty)
WRITEBACK=$(lctl get_param -n "llite.*.dump_page_cache" | grep -c writeback)
cancel_lru_locks mdc
cancel_lru_locks osc
t0=`date +%s`
-
+
can0=`lctl get_param -n ldlm.services.ldlm_canceld.stats | awk '/ldlm_cancel/ {print $2}'`
blk0=`lctl get_param -n ldlm.services.ldlm_cbd.stats | awk '/ldlm_bl_callback/ {print $2}'`
createmany -o $DIR/$tdir/f $count
# use touch to produce $NR new locks
log "create $NR files at $DIR/$tdir"
- createmany -o $DIR/$tdir/f $NR ||
- error "failed to create $NR files in $DIR/$tdir"
-
+ createmany -o $DIR/$tdir/f $NR ||
+ error "failed to create $NR files in $DIR/$tdir"
+
cancel_lru_locks mdc
ls -l $DIR/$tdir > /dev/null
[ -z "`lctl get_param -n mdc.*.connect_flags | grep lru_resize`" ] && \
skip "no lru resize on server" && return 0
- # even for cmd no matter what metadata namespace to use for getting
+ # even for cmd no matter what metadata namespace to use for getting
# the limit, we use appropriate.
LIMIT=`lctl get_param -n ldlm.namespaces.*mdc*.pool.limit`
NR=$LIMIT
fi
lru_resize_disable mdc
- mkdir -p $DIR/$tdir/disable_lru_resize ||
+ mkdir -p $DIR/$tdir/disable_lru_resize ||
error "failed to create $DIR/$tdir/disable_lru_resize"
createmany -o $DIR/$tdir/disable_lru_resize/f $NR
unlinkmany $DIR/$tdir/disable_lru_resize/f $NR
lru_resize_enable mdc
- mkdir -p $DIR/$tdir/enable_lru_resize ||
+ mkdir -p $DIR/$tdir/enable_lru_resize ||
error "failed to create $DIR/$tdir/enable_lru_resize"
createmany -o $DIR/$tdir/enable_lru_resize/f $NR
echo "got $COUNT $NAME"
case $NAME in
- ost_read|ost_write)
+ read_bytes|write_bytes)
[ $MIN -lt 4096 ] && error "min is too small: $MIN"
[ $MIN -gt $FSIZE ] && error "min is too big: $MIN"
[ $MAX -lt 4096 ] && error "max is too small: $MAX"
[ $MAX -gt $FSIZE ] && error "max is too big: $MAX"
[ $SUM -ne $FSIZE ] && error "sum is wrong: $SUM"
- [ $SUMSQ -lt $(((FSIZE /4096) * (4096 * 4096))) ] &&
+ [ $SUMSQ -lt $(((FSIZE /4096) * (4096 * 4096))) ] &&
error "sumsquare is too small: $SUMSQ"
- [ $SUMSQ -gt $((FSIZE * FSIZE)) ] &&
+ [ $SUMSQ -gt $((FSIZE * FSIZE)) ] &&
error "sumsquare is too big: $SUMSQ"
;;
*) ;;
done < $DIR/${tfile}.tmp
#check that we actually got some stats
- [ "$ost_read" ] || error "no read done"
- [ "$ost_write" ] || error "no write done"
+ [ "$read_bytes" ] || error "no read done"
+ [ "$write_bytes" ] || error "no write done"
}
run_test 127 "verify the client stats are sane"
[ "$FSTYPE" != "ldiskfs" ] && skip "not needed for FSTYPE=$FSTYPE" && return 0
DEV=$(basename $(do_facet mds lctl get_param -n mds.*.mntdev))
- [ -z "$DEV" ] && error "can't access mds mntdev"
+ [ -z "$DEV" ] && error "can't access mds mntdev"
EFBIG=27
LDPROC=/proc/fs/ldiskfs/$DEV/max_dir_size
MAX=16384