* GPL HEADER END
*/
/*
- * Copyright 2008 Sun Microsystems, Inc. All rights reserved
+ * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*/
/*
int rc;
LASSERT(key);
- rc = snprintf(key, NAME_MAX + 1, ORPHAN_FILE_NAME_FORMAT, fid_seq(lf),
+ rc = snprintf(key, NAME_MAX + 1, ORPHAN_FILE_NAME_FORMAT,
+ (long long unsigned int)fid_seq(lf),
fid_oid(lf), fid_ver(lf), op);
if (rc > 0)
return (struct dt_key*) key;
int rc;
LASSERT(key);
- rc = snprintf(key, NAME_MAX + 1, ORPHAN_FILE_NAME_FORMAT_18, fid_seq(lf),
- fid_oid(lf));
+ rc = snprintf(key, NAME_MAX + 1, ORPHAN_FILE_NAME_FORMAT_18,
+ (unsigned long long)fid_seq(lf), fid_oid(lf));
if (rc > 0)
return (struct dt_key*) key;
else
int rc = 0;
unsigned int op;
- rc = sscanf(key, ORPHAN_FILE_NAME_FORMAT, &lf->f_seq, &lf->f_oid,
+ rc = sscanf(key, ORPHAN_FILE_NAME_FORMAT,
+ (long long unsigned int *)&lf->f_seq, &lf->f_oid,
&lf->f_ver, &op);
if (rc == 4)
return 0;
/* build igif */
rc = sscanf(key, ORPHAN_FILE_NAME_FORMAT_18,
- &lf->f_seq, &lf->f_oid);
+ (long long unsigned int *)&lf->f_seq, &lf->f_oid);
if (rc == 2) {
lf->f_ver = 0;
return 0;
/* In recovery phase, do not need for any lock here */
iops = &dor->do_index_ops->dio_it;
- it = iops->init(env, dor, BYPASS_CAPA);
- if (it != NULL) {
+ it = iops->init(env, dor, LUDA_64BITHASH, BYPASS_CAPA);
+ if (!IS_ERR(it)) {
result = iops->load(env, it, 0);
if (result > 0) {
/* main cycle */
iops->put(env, it);
iops->fini(env, it);
} else {
- CERROR("not enough memory for clean pending.\n");
- result = -ENOMEM;
+ result = PTR_ERR(it);
+ CERROR("Cannot clean pending (%d).\n", result);
}
RETURN(result);