Allow objid for test_getattr to have a "t" (thread) prefix for symmetry
with test_brw, so that it will be possible to do a bunch of creates in
runregression net, and have the BRWs run I/O on different objects in
each thread.
struct timeval start, next_time;
int i, count, next_count;
int verbose = 1;
struct timeval start, next_time;
int i, count, next_count;
int verbose = 1;
- id = strtoull(argv[3], &end, 0);
+ if (argv[3][0] == 't')
+ objid = strtoull(argv[3] + 1, &end, 0) + thread;
+ else
+ objid = strtoull(argv[3], &end, 0);
if (*end) {
fprintf(stderr, "error: %s: invalid objid '%s'\n",
cmdname(argv[0]), argv[3]);
if (*end) {
fprintf(stderr, "error: %s: invalid objid '%s'\n",
cmdname(argv[0]), argv[3]);
cmdname(argv[0]), count, ctime(&start.tv_sec));
for (i = 1, next_count = verbose; i <= count; i++) {
cmdname(argv[0]), count, ctime(&start.tv_sec));
for (i = 1, next_count = verbose; i <= count; i++) {
- data.ioc_obdo1.o_id = id;
+ data.ioc_obdo1.o_id = objid;
data.ioc_obdo1.o_valid = 0xffffffff;
rc = ioctl(fd, OBD_IOC_GETATTR, &data);
SHMEM_BUMP();
data.ioc_obdo1.o_valid = 0xffffffff;
rc = ioctl(fd, OBD_IOC_GETATTR, &data);
SHMEM_BUMP();
next_time.tv_usec = start.tv_usec;
if (verbose != 0)
next_time.tv_usec = start.tv_usec;
if (verbose != 0)
- printf("%s: %s %dx%d pages (testing only): %s",
+ printf("%s: %s %dx%d pages (objid 0x%Lx): %s",
cmdname(argv[0]), write ? "writing" : "reading",
cmdname(argv[0]), write ? "writing" : "reading",
- count, pages, ctime(&start.tv_sec));
+ count, pages, (long long)objid, ctime(&start.tv_sec));
rc = ioctl(fd, OBD_IOC_OPEN, &data);
if (rc) {
rc = ioctl(fd, OBD_IOC_OPEN, &data);
if (rc) {