AC_DEFUN([LB_CHECK_FILES],
[AC_FOREACH([AC_FILE_NAME], [$1],
[LB_CHECK_FILE(AC_FILE_NAME,
- [AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_[]AC_FILE_NAME), 1,
+ [AC_DEFINE_UNQUOTED([AS_TR_CPP(HAVE_[]AC_FILE_NAME)], 1,
[Define to 1 if you have the
file `]AC_File['.])
$2],
entry->ue_primary = primary;
for (i = 0; i < ginfo->nblocks; i++) {
- int cp_count = min((int)NGROUPS_PER_BLOCK, (int)ngroups);
+ int cp_count = min_t(int, NGROUPS_PER_BLOCK, ngroups);
int off = i * NGROUPS_PER_BLOCK;
for (j = 0; j < cp_count; j++)
/* setup the directory tree */
push_ctxt(saved, &obd->obd_lvfs_ctxt, NULL);
- dentry = simple_mkdir(current->fs->pwd, mnt, "ROOT", 0755, 0);
+ dentry = simple_mkdir(cfs_fs_pwd(current->fs), mnt, "ROOT", 0755, 0);
if (IS_ERR(dentry)) {
rc = PTR_ERR(dentry);
CERROR("cannot create ROOT directory: rc = %d\n", rc);
dput(dentry);
- dentry = lookup_one_len("__iopen__", current->fs->pwd,
+ dentry = lookup_one_len("__iopen__", cfs_fs_pwd(current->fs),
strlen("__iopen__"));
if (IS_ERR(dentry)) {
rc = PTR_ERR(dentry);
GOTO(err_fid, rc);
}
- dentry = simple_mkdir(current->fs->pwd, mnt, "PENDING", 0777, 1);
+ dentry = simple_mkdir(cfs_fs_pwd(current->fs), mnt, "PENDING", 0777, 1);
if (IS_ERR(dentry)) {
rc = PTR_ERR(dentry);
CERROR("cannot create PENDING directory: rc = %d\n", rc);
mds->mds_pending_dir = dentry;
/* COMPAT_146 */
- dentry = simple_mkdir(current->fs->pwd, mnt, MDT_LOGS_DIR, 0777, 1);
+ dentry = simple_mkdir(cfs_fs_pwd(current->fs), mnt, MDT_LOGS_DIR, 0777, 1);
if (IS_ERR(dentry)) {
rc = PTR_ERR(dentry);
CERROR("cannot create %s directory: rc = %d\n",
mds->mds_logs_dir = dentry;
/* end COMPAT_146 */
- dentry = simple_mkdir(current->fs->pwd, mnt, "OBJECTS", 0777, 1);
+ dentry = simple_mkdir(cfs_fs_pwd(current->fs), mnt, "OBJECTS", 0777, 1);
if (IS_ERR(dentry)) {
rc = PTR_ERR(dentry);
CERROR("cannot create OBJECTS directory: rc = %d\n", rc);
push_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
/* Setup the configs dir */
- dentry = simple_mkdir(current->fs->pwd, mnt, MOUNT_CONFIGS_DIR, 0777, 1);
+ dentry = simple_mkdir(cfs_fs_pwd(current->fs), mnt, MOUNT_CONFIGS_DIR, 0777, 1);
if (IS_ERR(dentry)) {
rc = PTR_ERR(dentry);
CERROR("cannot create %s directory: rc = %d\n",
/* Need the iopen dir for fid2dentry, required by
LLOG_ORIGIN_HANDLE_READ_HEADER */
- dentry = lookup_one_len("__iopen__", current->fs->pwd,
+ dentry = lookup_one_len("__iopen__", cfs_fs_pwd(current->fs),
strlen("__iopen__"));
if (IS_ERR(dentry)) {
rc = PTR_ERR(dentry);
int i, rc = 0, cleanup_phase = 0;
ENTRY;
- O_dentry = simple_mkdir(current->fs->pwd, filter->fo_vfsmnt,
+ O_dentry = simple_mkdir(cfs_fs_pwd(current->fs), filter->fo_vfsmnt,
"O", 0700, 1);
CDEBUG(D_INODE, "got/created O: %p\n", O_dentry);
if (IS_ERR(O_dentry)) {
__u8 *uuid_ptr;
char *str, *label;
char ns_name[48];
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,9)
- request_queue_t *q;
-#endif
+ struct request_queue *q;
int rc;
ENTRY;
if (rc)
GOTO(err_post, rc);
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,9)
q = bdev_get_queue(mnt->mnt_sb->s_bdev);
if (q->max_sectors < q->max_hw_sectors &&
q->max_sectors < PTLRPC_MAX_BRW_SIZE >> 9)
"could be up to max_hw_sectors=%u\n",
obd->obd_name, mnt->mnt_sb->s_id,
q->max_sectors, q->max_hw_sectors);
-#endif
uuid_ptr = fsfilt_uuid(obd, obd->u.obt.obt_sb);
if (uuid_ptr != NULL) {