Commit e15ba45d authored by Oleg Drokin's avatar Oleg Drokin Committed by Greg Kroah-Hartman

staging/lustre/llite: Fix style vs open parenthesis alignment

This mostly fixes checkpatch complaints about
"Alignment should match open parenthesis"
Signed-off-by: default avatarOleg Drokin <green@linuxhacker.ru>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 82ddecfe
...@@ -183,8 +183,7 @@ static int ll_ddelete(const struct dentry *de) ...@@ -183,8 +183,7 @@ static int ll_ddelete(const struct dentry *de)
int ll_d_init(struct dentry *de) int ll_d_init(struct dentry *de)
{ {
CDEBUG(D_DENTRY, "ldd on dentry %pd (%p) parent %p inode %p refc %d\n", CDEBUG(D_DENTRY, "ldd on dentry %pd (%p) parent %p inode %p refc %d\n",
de, de, de->d_parent, d_inode(de), de, de, de->d_parent, d_inode(de), d_count(de));
d_count(de));
if (!de->d_fsdata) { if (!de->d_fsdata) {
struct ll_dentry_data *lld; struct ll_dentry_data *lld;
......
...@@ -355,7 +355,7 @@ struct page *ll_get_dir_page(struct inode *dir, __u64 hash, ...@@ -355,7 +355,7 @@ struct page *ll_get_dir_page(struct inode *dir, __u64 hash,
struct md_op_data *op_data; struct md_op_data *op_data;
op_data = ll_prep_md_op_data(NULL, dir, dir, NULL, 0, 0, op_data = ll_prep_md_op_data(NULL, dir, dir, NULL, 0, 0,
LUSTRE_OPC_ANY, NULL); LUSTRE_OPC_ANY, NULL);
if (IS_ERR(op_data)) if (IS_ERR(op_data))
return (void *)op_data; return (void *)op_data;
...@@ -368,8 +368,8 @@ struct page *ll_get_dir_page(struct inode *dir, __u64 hash, ...@@ -368,8 +368,8 @@ struct page *ll_get_dir_page(struct inode *dir, __u64 hash,
if (request) if (request)
ptlrpc_req_finished(request); ptlrpc_req_finished(request);
if (rc < 0) { if (rc < 0) {
CERROR("lock enqueue: "DFID" at %llu: rc %d\n", CERROR("lock enqueue: " DFID " at %llu: rc %d\n",
PFID(ll_inode2fid(dir)), hash, rc); PFID(ll_inode2fid(dir)), hash, rc);
return ERR_PTR(rc); return ERR_PTR(rc);
} }
......
...@@ -287,8 +287,9 @@ static int ll_md_close(struct obd_export *md_exp, struct inode *inode, ...@@ -287,8 +287,9 @@ static int ll_md_close(struct obd_export *md_exp, struct inode *inode,
* application crashed, we need to release here. * application crashed, we need to release here.
*/ */
rc = ll_lease_close(fd->fd_lease_och, inode, &lease_broken); rc = ll_lease_close(fd->fd_lease_och, inode, &lease_broken);
CDEBUG(rc ? D_ERROR : D_INODE, "Clean up lease "DFID" %d/%d\n", CDEBUG(rc ? D_ERROR : D_INODE,
PFID(&lli->lli_fid), rc, lease_broken); "Clean up lease " DFID " %d/%d\n",
PFID(&lli->lli_fid), rc, lease_broken);
fd->fd_lease_och = NULL; fd->fd_lease_och = NULL;
} }
...@@ -432,7 +433,7 @@ static int ll_intent_file_open(struct dentry *dentry, void *lmm, ...@@ -432,7 +433,7 @@ static int ll_intent_file_open(struct dentry *dentry, void *lmm,
* with messages with -ESTALE errors. * with messages with -ESTALE errors.
*/ */
if (!it_disposition(itp, DISP_OPEN_OPEN) || if (!it_disposition(itp, DISP_OPEN_OPEN) ||
it_open_error(DISP_OPEN_OPEN, itp)) it_open_error(DISP_OPEN_OPEN, itp))
goto out; goto out;
ll_release_openhandle(inode, itp); ll_release_openhandle(inode, itp);
goto out; goto out;
...@@ -727,7 +728,8 @@ int ll_file_open(struct inode *inode, struct file *file) ...@@ -727,7 +728,8 @@ int ll_file_open(struct inode *inode, struct file *file)
} }
static int ll_md_blocking_lease_ast(struct ldlm_lock *lock, static int ll_md_blocking_lease_ast(struct ldlm_lock *lock,
struct ldlm_lock_desc *desc, void *data, int flag) struct ldlm_lock_desc *desc,
void *data, int flag)
{ {
int rc; int rc;
struct lustre_handle lockh; struct lustre_handle lockh;
...@@ -814,7 +816,7 @@ ll_lease_open(struct inode *inode, struct file *file, fmode_t fmode, ...@@ -814,7 +816,7 @@ ll_lease_open(struct inode *inode, struct file *file, fmode_t fmode,
return ERR_PTR(-ENOMEM); return ERR_PTR(-ENOMEM);
op_data = ll_prep_md_op_data(NULL, inode, inode, NULL, 0, 0, op_data = ll_prep_md_op_data(NULL, inode, inode, NULL, 0, 0,
LUSTRE_OPC_ANY, NULL); LUSTRE_OPC_ANY, NULL);
if (IS_ERR(op_data)) { if (IS_ERR(op_data)) {
rc = PTR_ERR(op_data); rc = PTR_ERR(op_data);
goto out; goto out;
...@@ -826,7 +828,7 @@ ll_lease_open(struct inode *inode, struct file *file, fmode_t fmode, ...@@ -826,7 +828,7 @@ ll_lease_open(struct inode *inode, struct file *file, fmode_t fmode,
it.it_flags = fmode | open_flags; it.it_flags = fmode | open_flags;
it.it_flags |= MDS_OPEN_LOCK | MDS_OPEN_BY_FID | MDS_OPEN_LEASE; it.it_flags |= MDS_OPEN_LOCK | MDS_OPEN_BY_FID | MDS_OPEN_LEASE;
rc = md_intent_lock(sbi->ll_md_exp, op_data, NULL, 0, &it, 0, &req, rc = md_intent_lock(sbi->ll_md_exp, op_data, NULL, 0, &it, 0, &req,
ll_md_blocking_lease_ast, ll_md_blocking_lease_ast,
/* LDLM_FL_NO_LRU: To not put the lease lock into LRU list, otherwise /* LDLM_FL_NO_LRU: To not put the lease lock into LRU list, otherwise
* it can be cancelled which may mislead applications that the lease is * it can be cancelled which may mislead applications that the lease is
* broken; * broken;
...@@ -863,8 +865,8 @@ ll_lease_open(struct inode *inode, struct file *file, fmode_t fmode, ...@@ -863,8 +865,8 @@ ll_lease_open(struct inode *inode, struct file *file, fmode_t fmode,
it.d.lustre.it_lock_bits != MDS_INODELOCK_OPEN) { it.d.lustre.it_lock_bits != MDS_INODELOCK_OPEN) {
/* open lock must return for lease */ /* open lock must return for lease */
CERROR(DFID "lease granted but no open lock, %d/%llu.\n", CERROR(DFID "lease granted but no open lock, %d/%llu.\n",
PFID(ll_inode2fid(inode)), it.d.lustre.it_lock_mode, PFID(ll_inode2fid(inode)), it.d.lustre.it_lock_mode,
it.d.lustre.it_lock_bits); it.d.lustre.it_lock_bits);
rc = -EPROTO; rc = -EPROTO;
goto out_close; goto out_close;
} }
...@@ -880,7 +882,7 @@ ll_lease_open(struct inode *inode, struct file *file, fmode_t fmode, ...@@ -880,7 +882,7 @@ ll_lease_open(struct inode *inode, struct file *file, fmode_t fmode,
/* cancel open lock */ /* cancel open lock */
if (it.d.lustre.it_lock_mode != 0) { if (it.d.lustre.it_lock_mode != 0) {
ldlm_lock_decref_and_cancel(&och->och_lease_handle, ldlm_lock_decref_and_cancel(&och->och_lease_handle,
it.d.lustre.it_lock_mode); it.d.lustre.it_lock_mode);
it.d.lustre.it_lock_mode = 0; it.d.lustre.it_lock_mode = 0;
} }
out_release_it: out_release_it:
...@@ -909,8 +911,8 @@ static int ll_lease_close(struct obd_client_handle *och, struct inode *inode, ...@@ -909,8 +911,8 @@ static int ll_lease_close(struct obd_client_handle *och, struct inode *inode,
ldlm_lock_put(lock); ldlm_lock_put(lock);
} }
CDEBUG(D_INODE, "lease for "DFID" broken? %d\n", CDEBUG(D_INODE, "lease for " DFID " broken? %d\n",
PFID(&ll_i2info(inode)->lli_fid), cancelled); PFID(&ll_i2info(inode)->lli_fid), cancelled);
if (!cancelled) if (!cancelled)
ldlm_cli_cancel(&och->och_lease_handle, 0); ldlm_cli_cancel(&och->och_lease_handle, 0);
...@@ -1026,8 +1028,8 @@ int ll_merge_lvb(const struct lu_env *env, struct inode *inode) ...@@ -1026,8 +1028,8 @@ int ll_merge_lvb(const struct lu_env *env, struct inode *inode)
if (lvb.lvb_mtime < attr->cat_mtime) if (lvb.lvb_mtime < attr->cat_mtime)
lvb.lvb_mtime = attr->cat_mtime; lvb.lvb_mtime = attr->cat_mtime;
CDEBUG(D_VFSTRACE, DFID" updating i_size %llu\n", CDEBUG(D_VFSTRACE, DFID " updating i_size %llu\n",
PFID(&lli->lli_fid), attr->cat_size); PFID(&lli->lli_fid), attr->cat_size);
cl_isize_write_nolock(inode, attr->cat_size); cl_isize_write_nolock(inode, attr->cat_size);
inode->i_blocks = attr->cat_blocks; inode->i_blocks = attr->cat_blocks;
...@@ -1239,7 +1241,7 @@ static ssize_t ll_file_write_iter(struct kiocb *iocb, struct iov_iter *from) ...@@ -1239,7 +1241,7 @@ static ssize_t ll_file_write_iter(struct kiocb *iocb, struct iov_iter *from)
args->u.normal.via_iocb = iocb; args->u.normal.via_iocb = iocb;
result = ll_file_io_generic(env, args, iocb->ki_filp, CIT_WRITE, result = ll_file_io_generic(env, args, iocb->ki_filp, CIT_WRITE,
&iocb->ki_pos, iov_iter_count(from)); &iocb->ki_pos, iov_iter_count(from));
cl_env_put(env, &refcheck); cl_env_put(env, &refcheck);
return result; return result;
} }
...@@ -1423,7 +1425,7 @@ int ll_lov_getstripe_ea_info(struct inode *inode, const char *filename, ...@@ -1423,7 +1425,7 @@ int ll_lov_getstripe_ea_info(struct inode *inode, const char *filename,
lmmsize = body->eadatasize; lmmsize = body->eadatasize;
if (!(body->valid & (OBD_MD_FLEASIZE | OBD_MD_FLDIREA)) || if (!(body->valid & (OBD_MD_FLEASIZE | OBD_MD_FLDIREA)) ||
lmmsize == 0) { lmmsize == 0) {
rc = -ENODATA; rc = -ENODATA;
goto out; goto out;
} }
...@@ -1474,7 +1476,7 @@ int ll_lov_getstripe_ea_info(struct inode *inode, const char *filename, ...@@ -1474,7 +1476,7 @@ int ll_lov_getstripe_ea_info(struct inode *inode, const char *filename,
} }
static int ll_lov_setea(struct inode *inode, struct file *file, static int ll_lov_setea(struct inode *inode, struct file *file,
unsigned long arg) unsigned long arg)
{ {
int flags = MDS_OPEN_HAS_OBJS | FMODE_WRITE; int flags = MDS_OPEN_HAS_OBJS | FMODE_WRITE;
struct lov_user_md *lump; struct lov_user_md *lump;
...@@ -1495,7 +1497,7 @@ static int ll_lov_setea(struct inode *inode, struct file *file, ...@@ -1495,7 +1497,7 @@ static int ll_lov_setea(struct inode *inode, struct file *file,
} }
rc = ll_lov_setstripe_ea_info(inode, file->f_path.dentry, flags, lump, rc = ll_lov_setstripe_ea_info(inode, file->f_path.dentry, flags, lump,
lum_size); lum_size);
cl_lov_delay_create_clear(&file->f_flags); cl_lov_delay_create_clear(&file->f_flags);
kvfree(lump); kvfree(lump);
...@@ -1618,7 +1620,7 @@ static int ll_put_grouplock(struct inode *inode, struct file *file, ...@@ -1618,7 +1620,7 @@ static int ll_put_grouplock(struct inode *inode, struct file *file,
if (fd->fd_grouplock.cg_gid != arg) { if (fd->fd_grouplock.cg_gid != arg) {
CWARN("group lock %lu doesn't match current id %lu\n", CWARN("group lock %lu doesn't match current id %lu\n",
arg, fd->fd_grouplock.cg_gid); arg, fd->fd_grouplock.cg_gid);
spin_unlock(&lli->lli_lock); spin_unlock(&lli->lli_lock);
return -EINVAL; return -EINVAL;
} }
...@@ -1802,7 +1804,7 @@ static int ll_ioctl_fiemap(struct inode *inode, unsigned long arg) ...@@ -1802,7 +1804,7 @@ static int ll_ioctl_fiemap(struct inode *inode, unsigned long arg)
* required fiemap buffer * required fiemap buffer
*/ */
if (get_user(extent_count, if (get_user(extent_count,
&((struct ll_user_fiemap __user *)arg)->fm_extent_count)) &((struct ll_user_fiemap __user *)arg)->fm_extent_count))
return -EFAULT; return -EFAULT;
if (extent_count >= if (extent_count >=
...@@ -1828,8 +1830,8 @@ static int ll_ioctl_fiemap(struct inode *inode, unsigned long arg) ...@@ -1828,8 +1830,8 @@ static int ll_ioctl_fiemap(struct inode *inode, unsigned long arg)
*/ */
if (extent_count) { if (extent_count) {
if (copy_from_user(&fiemap_s->fm_extents[0], if (copy_from_user(&fiemap_s->fm_extents[0],
(char __user *)arg + sizeof(*fiemap_s), (char __user *)arg + sizeof(*fiemap_s),
sizeof(struct ll_fiemap_extent))) { sizeof(struct ll_fiemap_extent))) {
rc = -EFAULT; rc = -EFAULT;
goto error; goto error;
} }
...@@ -2330,7 +2332,7 @@ ll_file_ioctl(struct file *file, unsigned int cmd, unsigned long arg) ...@@ -2330,7 +2332,7 @@ ll_file_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
return -EFAULT; return -EFAULT;
rc = ll_data_version(inode, &idv.idv_version, rc = ll_data_version(inode, &idv.idv_version,
!(idv.idv_flags & LL_DV_NOFLUSH)); !(idv.idv_flags & LL_DV_NOFLUSH));
if (rc == 0 && copy_to_user((char __user *)arg, &idv, if (rc == 0 && copy_to_user((char __user *)arg, &idv,
sizeof(idv))) sizeof(idv)))
...@@ -2738,7 +2740,7 @@ ll_file_flock(struct file *file, int cmd, struct file_lock *file_lock) ...@@ -2738,7 +2740,7 @@ ll_file_flock(struct file *file, int cmd, struct file_lock *file_lock)
break; break;
default: default:
CDEBUG(D_INFO, "Unknown fcntl lock type: %d\n", CDEBUG(D_INFO, "Unknown fcntl lock type: %d\n",
file_lock->fl_type); file_lock->fl_type);
return -ENOTSUPP; return -ENOTSUPP;
} }
...@@ -2789,7 +2791,7 @@ ll_file_flock(struct file *file, int cmd, struct file_lock *file_lock) ...@@ -2789,7 +2791,7 @@ ll_file_flock(struct file *file, int cmd, struct file_lock *file_lock)
if (rc2 && file_lock->fl_type != F_UNLCK) { if (rc2 && file_lock->fl_type != F_UNLCK) {
einfo.ei_mode = LCK_NL; einfo.ei_mode = LCK_NL;
md_enqueue(sbi->ll_md_exp, &einfo, NULL, md_enqueue(sbi->ll_md_exp, &einfo, NULL,
op_data, &lockh, &flock, 0, NULL /* req */, flags); op_data, &lockh, &flock, 0, NULL /* req */, flags);
rc = rc2; rc = rc2;
} }
...@@ -3455,9 +3457,9 @@ static int ll_layout_lock_set(struct lustre_handle *lockh, enum ldlm_mode mode, ...@@ -3455,9 +3457,9 @@ static int ll_layout_lock_set(struct lustre_handle *lockh, enum ldlm_mode mode,
*gen = md.lsm->lsm_layout_gen; *gen = md.lsm->lsm_layout_gen;
rc = 0; rc = 0;
} else { } else {
CERROR("%s: file "DFID" unpackmd error: %d\n", CERROR("%s: file " DFID " unpackmd error: %d\n",
ll_get_fsname(inode->i_sb, NULL, 0), ll_get_fsname(inode->i_sb, NULL, 0),
PFID(&lli->lli_fid), rc); PFID(&lli->lli_fid), rc);
} }
} }
if (rc < 0) if (rc < 0)
...@@ -3485,9 +3487,9 @@ static int ll_layout_lock_set(struct lustre_handle *lockh, enum ldlm_mode mode, ...@@ -3485,9 +3487,9 @@ static int ll_layout_lock_set(struct lustre_handle *lockh, enum ldlm_mode mode,
/* wait for IO to complete if it's still being used. */ /* wait for IO to complete if it's still being used. */
if (wait_layout) { if (wait_layout) {
CDEBUG(D_INODE, "%s: %p/"DFID" wait for layout reconf.\n", CDEBUG(D_INODE, "%s: %p/" DFID " wait for layout reconf.\n",
ll_get_fsname(inode->i_sb, NULL, 0), ll_get_fsname(inode->i_sb, NULL, 0),
inode, PFID(&lli->lli_fid)); inode, PFID(&lli->lli_fid));
memset(&conf, 0, sizeof(conf)); memset(&conf, 0, sizeof(conf));
conf.coc_opc = OBJECT_CONF_WAIT; conf.coc_opc = OBJECT_CONF_WAIT;
...@@ -3496,8 +3498,8 @@ static int ll_layout_lock_set(struct lustre_handle *lockh, enum ldlm_mode mode, ...@@ -3496,8 +3498,8 @@ static int ll_layout_lock_set(struct lustre_handle *lockh, enum ldlm_mode mode,
if (rc == 0) if (rc == 0)
rc = -EAGAIN; rc = -EAGAIN;
CDEBUG(D_INODE, "file: "DFID" waiting layout return: %d.\n", CDEBUG(D_INODE, "file: " DFID " waiting layout return: %d.\n",
PFID(&lli->lli_fid), rc); PFID(&lli->lli_fid), rc);
} }
return rc; return rc;
} }
...@@ -3558,7 +3560,7 @@ int ll_layout_refresh(struct inode *inode, __u32 *gen) ...@@ -3558,7 +3560,7 @@ int ll_layout_refresh(struct inode *inode, __u32 *gen)
} }
op_data = ll_prep_md_op_data(NULL, inode, inode, NULL, op_data = ll_prep_md_op_data(NULL, inode, inode, NULL,
0, 0, LUSTRE_OPC_ANY, NULL); 0, 0, LUSTRE_OPC_ANY, NULL);
if (IS_ERR(op_data)) { if (IS_ERR(op_data)) {
mutex_unlock(&lli->lli_layout_mutex); mutex_unlock(&lli->lli_layout_mutex);
return PTR_ERR(op_data); return PTR_ERR(op_data);
...@@ -3569,8 +3571,8 @@ int ll_layout_refresh(struct inode *inode, __u32 *gen) ...@@ -3569,8 +3571,8 @@ int ll_layout_refresh(struct inode *inode, __u32 *gen)
it.it_op = IT_LAYOUT; it.it_op = IT_LAYOUT;
lockh.cookie = 0ULL; lockh.cookie = 0ULL;
LDLM_DEBUG_NOLOCK("%s: requeue layout lock for file %p/"DFID".\n", LDLM_DEBUG_NOLOCK("%s: requeue layout lock for file %p/" DFID ".\n",
ll_get_fsname(inode->i_sb, NULL, 0), inode, ll_get_fsname(inode->i_sb, NULL, 0), inode,
PFID(&lli->lli_fid)); PFID(&lli->lli_fid));
rc = md_enqueue(sbi->ll_md_exp, &einfo, &it, op_data, &lockh, rc = md_enqueue(sbi->ll_md_exp, &einfo, &it, op_data, &lockh,
......
...@@ -53,8 +53,7 @@ void vvp_write_pending(struct ccc_object *club, struct ccc_page *page) ...@@ -53,8 +53,7 @@ void vvp_write_pending(struct ccc_object *club, struct ccc_page *page)
spin_lock(&lli->lli_lock); spin_lock(&lli->lli_lock);
lli->lli_flags |= LLIF_SOM_DIRTY; lli->lli_flags |= LLIF_SOM_DIRTY;
if (page && list_empty(&page->cpg_pending_linkage)) if (page && list_empty(&page->cpg_pending_linkage))
list_add(&page->cpg_pending_linkage, list_add(&page->cpg_pending_linkage, &club->cob_pending_list);
&club->cob_pending_list);
spin_unlock(&lli->lli_lock); spin_unlock(&lli->lli_lock);
} }
...@@ -322,7 +321,7 @@ static struct ll_inode_info *ll_close_next_lli(struct ll_close_queue *lcq) ...@@ -322,7 +321,7 @@ static struct ll_inode_info *ll_close_next_lli(struct ll_close_queue *lcq)
if (!list_empty(&lcq->lcq_head)) { if (!list_empty(&lcq->lcq_head)) {
lli = list_entry(lcq->lcq_head.next, struct ll_inode_info, lli = list_entry(lcq->lcq_head.next, struct ll_inode_info,
lli_close_list); lli_close_list);
list_del_init(&lli->lli_close_list); list_del_init(&lli->lli_close_list);
} else if (atomic_read(&lcq->lcq_stop)) } else if (atomic_read(&lcq->lcq_stop))
lli = ERR_PTR(-EALREADY); lli = ERR_PTR(-EALREADY);
......
...@@ -287,11 +287,8 @@ static inline void ll_layout_version_set(struct ll_inode_info *lli, __u32 gen) ...@@ -287,11 +287,8 @@ static inline void ll_layout_version_set(struct ll_inode_info *lli, __u32 gen)
int ll_xattr_cache_destroy(struct inode *inode); int ll_xattr_cache_destroy(struct inode *inode);
int ll_xattr_cache_get(struct inode *inode, int ll_xattr_cache_get(struct inode *inode, const char *name,
const char *name, char *buffer, size_t size, __u64 valid);
char *buffer,
size_t size,
__u64 valid);
/* /*
* Locking to guarantee consistency of non-atomic updates to long long i_size, * Locking to guarantee consistency of non-atomic updates to long long i_size,
...@@ -970,8 +967,8 @@ int ll_close_thread_start(struct ll_close_queue **lcq_ret); ...@@ -970,8 +967,8 @@ int ll_close_thread_start(struct ll_close_queue **lcq_ret);
int ll_teardown_mmaps(struct address_space *mapping, __u64 first, __u64 last); int ll_teardown_mmaps(struct address_space *mapping, __u64 first, __u64 last);
int ll_file_mmap(struct file *file, struct vm_area_struct *vma); int ll_file_mmap(struct file *file, struct vm_area_struct *vma);
void policy_from_vma(ldlm_policy_data_t *policy, void policy_from_vma(ldlm_policy_data_t *policy, struct vm_area_struct *vma,
struct vm_area_struct *vma, unsigned long addr, size_t count); unsigned long addr, size_t count);
struct vm_area_struct *our_vma(struct mm_struct *mm, unsigned long addr, struct vm_area_struct *our_vma(struct mm_struct *mm, unsigned long addr,
size_t count); size_t count);
......
...@@ -254,8 +254,8 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt, ...@@ -254,8 +254,8 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt,
* available * available
*/ */
err = obd_statfs(NULL, sbi->ll_md_exp, osfs, err = obd_statfs(NULL, sbi->ll_md_exp, osfs,
cfs_time_shift_64(-OBD_STATFS_CACHE_SECONDS), cfs_time_shift_64(-OBD_STATFS_CACHE_SECONDS),
OBD_STATFS_FOR_MDT0); OBD_STATFS_FOR_MDT0);
if (err) if (err)
goto out_md_fid; goto out_md_fid;
...@@ -536,7 +536,7 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt, ...@@ -536,7 +536,7 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt,
sb->s_root = d_make_root(root); sb->s_root = d_make_root(root);
if (!sb->s_root) { if (!sb->s_root) {
CERROR("%s: can't make root dentry\n", CERROR("%s: can't make root dentry\n",
ll_get_fsname(sb, NULL, 0)); ll_get_fsname(sb, NULL, 0));
err = -ENOMEM; err = -ENOMEM;
goto out_lock_cn_cb; goto out_lock_cn_cb;
} }
...@@ -601,7 +601,7 @@ int ll_get_default_mdsize(struct ll_sb_info *sbi, int *lmmsize) ...@@ -601,7 +601,7 @@ int ll_get_default_mdsize(struct ll_sb_info *sbi, int *lmmsize)
size = sizeof(int); size = sizeof(int);
rc = obd_get_info(NULL, sbi->ll_md_exp, sizeof(KEY_DEFAULT_EASIZE), rc = obd_get_info(NULL, sbi->ll_md_exp, sizeof(KEY_DEFAULT_EASIZE),
KEY_DEFAULT_EASIZE, &size, lmmsize, NULL); KEY_DEFAULT_EASIZE, &size, lmmsize, NULL);
if (rc) if (rc)
CERROR("Get default mdsize error rc %d\n", rc); CERROR("Get default mdsize error rc %d\n", rc);
...@@ -1100,7 +1100,7 @@ void ll_clear_inode(struct inode *inode) ...@@ -1100,7 +1100,7 @@ void ll_clear_inode(struct inode *inode)
#define TIMES_SET_FLAGS (ATTR_MTIME_SET | ATTR_ATIME_SET | ATTR_TIMES_SET) #define TIMES_SET_FLAGS (ATTR_MTIME_SET | ATTR_ATIME_SET | ATTR_TIMES_SET)
static int ll_md_setattr(struct dentry *dentry, struct md_op_data *op_data, static int ll_md_setattr(struct dentry *dentry, struct md_op_data *op_data,
struct md_open_data **mod) struct md_open_data **mod)
{ {
struct lustre_md md; struct lustre_md md;
struct inode *inode = d_inode(dentry); struct inode *inode = d_inode(dentry);
...@@ -1215,11 +1215,11 @@ int ll_setattr_raw(struct dentry *dentry, struct iattr *attr, bool hsm_import) ...@@ -1215,11 +1215,11 @@ int ll_setattr_raw(struct dentry *dentry, struct iattr *attr, bool hsm_import)
int rc = 0, rc1 = 0; int rc = 0, rc1 = 0;
CDEBUG(D_VFSTRACE, CDEBUG(D_VFSTRACE,
"%s: setattr inode %p/fid:"DFID "%s: setattr inode %p/fid:" DFID
" from %llu to %llu, valid %x, hsm_import %d\n", " from %llu to %llu, valid %x, hsm_import %d\n",
ll_get_fsname(inode->i_sb, NULL, 0), inode, ll_get_fsname(inode->i_sb, NULL, 0), inode,
PFID(&lli->lli_fid), i_size_read(inode), attr->ia_size, PFID(&lli->lli_fid), i_size_read(inode), attr->ia_size,
attr->ia_valid, hsm_import); attr->ia_valid, hsm_import);
if (attr->ia_valid & ATTR_SIZE) { if (attr->ia_valid & ATTR_SIZE) {
/* Check new size against VFS/VM file size limit and rlimit */ /* Check new size against VFS/VM file size limit and rlimit */
...@@ -1826,7 +1826,7 @@ int ll_flush_ctx(struct inode *inode) ...@@ -1826,7 +1826,7 @@ int ll_flush_ctx(struct inode *inode)
struct ll_sb_info *sbi = ll_i2sbi(inode); struct ll_sb_info *sbi = ll_i2sbi(inode);
CDEBUG(D_SEC, "flush context for user %d\n", CDEBUG(D_SEC, "flush context for user %d\n",
from_kuid(&init_user_ns, current_uid())); from_kuid(&init_user_ns, current_uid()));
obd_set_info_async(NULL, sbi->ll_md_exp, obd_set_info_async(NULL, sbi->ll_md_exp,
sizeof(KEY_FLUSH_CTX), KEY_FLUSH_CTX, sizeof(KEY_FLUSH_CTX), KEY_FLUSH_CTX,
...@@ -2127,9 +2127,9 @@ int ll_process_config(struct lustre_cfg *lcfg) ...@@ -2127,9 +2127,9 @@ int ll_process_config(struct lustre_cfg *lcfg)
/* this function prepares md_op_data hint for passing ot down to MD stack. */ /* this function prepares md_op_data hint for passing ot down to MD stack. */
struct md_op_data *ll_prep_md_op_data(struct md_op_data *op_data, struct md_op_data *ll_prep_md_op_data(struct md_op_data *op_data,
struct inode *i1, struct inode *i2, struct inode *i1, struct inode *i2,
const char *name, int namelen, const char *name, int namelen,
int mode, __u32 opc, void *data) int mode, __u32 opc, void *data)
{ {
if (namelen > ll_i2sbi(i1)->ll_namelen) if (namelen > ll_i2sbi(i1)->ll_namelen)
return ERR_PTR(-ENAMETOOLONG); return ERR_PTR(-ENAMETOOLONG);
......
...@@ -54,8 +54,8 @@ ...@@ -54,8 +54,8 @@
static const struct vm_operations_struct ll_file_vm_ops; static const struct vm_operations_struct ll_file_vm_ops;
void policy_from_vma(ldlm_policy_data_t *policy, void policy_from_vma(ldlm_policy_data_t *policy,
struct vm_area_struct *vma, unsigned long addr, struct vm_area_struct *vma, unsigned long addr,
size_t count) size_t count)
{ {
policy->l_extent.start = ((addr - vma->vm_start) & CFS_PAGE_MASK) + policy->l_extent.start = ((addr - vma->vm_start) & CFS_PAGE_MASK) +
(vma->vm_pgoff << PAGE_CACHE_SHIFT); (vma->vm_pgoff << PAGE_CACHE_SHIFT);
......
...@@ -191,8 +191,8 @@ static int ll_encode_fh(struct inode *inode, __u32 *fh, int *plen, ...@@ -191,8 +191,8 @@ static int ll_encode_fh(struct inode *inode, __u32 *fh, int *plen,
int fileid_len = sizeof(struct lustre_nfs_fid) / 4; int fileid_len = sizeof(struct lustre_nfs_fid) / 4;
struct lustre_nfs_fid *nfs_fid = (void *)fh; struct lustre_nfs_fid *nfs_fid = (void *)fh;
CDEBUG(D_INFO, "encoding for (%lu,"DFID") maxlen=%d minlen=%d\n", CDEBUG(D_INFO, "encoding for (%lu," DFID ") maxlen=%d minlen=%d\n",
inode->i_ino, PFID(ll_inode2fid(inode)), *plen, fileid_len); inode->i_ino, PFID(ll_inode2fid(inode)), *plen, fileid_len);
if (*plen < fileid_len) { if (*plen < fileid_len) {
*plen = fileid_len; *plen = fileid_len;
...@@ -298,8 +298,8 @@ static struct dentry *ll_get_parent(struct dentry *dchild) ...@@ -298,8 +298,8 @@ static struct dentry *ll_get_parent(struct dentry *dchild)
sbi = ll_s2sbi(dir->i_sb); sbi = ll_s2sbi(dir->i_sb);
CDEBUG(D_INFO, "getting parent for (%lu,"DFID")\n", CDEBUG(D_INFO, "getting parent for (%lu," DFID ")\n",
dir->i_ino, PFID(ll_inode2fid(dir))); dir->i_ino, PFID(ll_inode2fid(dir)));
rc = ll_get_default_mdsize(sbi, &lmmsize); rc = ll_get_default_mdsize(sbi, &lmmsize);
if (rc != 0) if (rc != 0)
...@@ -320,8 +320,8 @@ static struct dentry *ll_get_parent(struct dentry *dchild) ...@@ -320,8 +320,8 @@ static struct dentry *ll_get_parent(struct dentry *dchild)
body = req_capsule_server_get(&req->rq_pill, &RMF_MDT_BODY); body = req_capsule_server_get(&req->rq_pill, &RMF_MDT_BODY);
LASSERT(body->valid & OBD_MD_FLID); LASSERT(body->valid & OBD_MD_FLID);
CDEBUG(D_INFO, "parent for "DFID" is "DFID"\n", CDEBUG(D_INFO, "parent for " DFID " is " DFID "\n",
PFID(ll_inode2fid(dir)), PFID(&body->fid1)); PFID(ll_inode2fid(dir)), PFID(&body->fid1));
result = ll_iget_for_nfs(dir->i_sb, &body->fid1, NULL); result = ll_iget_for_nfs(dir->i_sb, &body->fid1, NULL);
......
...@@ -98,7 +98,7 @@ static void rce_free(struct rmtacl_ctl_entry *rce) ...@@ -98,7 +98,7 @@ static void rce_free(struct rmtacl_ctl_entry *rce)
} }
static struct rmtacl_ctl_entry *__rct_search(struct rmtacl_ctl_table *rct, static struct rmtacl_ctl_entry *__rct_search(struct rmtacl_ctl_table *rct,
pid_t key) pid_t key)
{ {
struct rmtacl_ctl_entry *rce; struct rmtacl_ctl_entry *rce;
struct list_head *head = &rct->rct_entries[rce_hashfunc(key)]; struct list_head *head = &rct->rct_entries[rce_hashfunc(key)];
...@@ -172,7 +172,7 @@ void rct_fini(struct rmtacl_ctl_table *rct) ...@@ -172,7 +172,7 @@ void rct_fini(struct rmtacl_ctl_table *rct)
for (i = 0; i < RCE_HASHES; i++) for (i = 0; i < RCE_HASHES; i++)
while (!list_empty(&rct->rct_entries[i])) { while (!list_empty(&rct->rct_entries[i])) {
rce = list_entry(rct->rct_entries[i].next, rce = list_entry(rct->rct_entries[i].next,
struct rmtacl_ctl_entry, rce_list); struct rmtacl_ctl_entry, rce_list);
rce_free(rce); rce_free(rce);
} }
spin_unlock(&rct->rct_lock); spin_unlock(&rct->rct_lock);
...@@ -208,7 +208,7 @@ void ee_free(struct eacl_entry *ee) ...@@ -208,7 +208,7 @@ void ee_free(struct eacl_entry *ee)
} }
static struct eacl_entry *__et_search_del(struct eacl_table *et, pid_t key, static struct eacl_entry *__et_search_del(struct eacl_table *et, pid_t key,
struct lu_fid *fid, int type) struct lu_fid *fid, int type)
{ {
struct eacl_entry *ee; struct eacl_entry *ee;
struct list_head *head = &et->et_entries[ee_hashfunc(key)]; struct list_head *head = &et->et_entries[ee_hashfunc(key)];
...@@ -290,7 +290,7 @@ void et_fini(struct eacl_table *et) ...@@ -290,7 +290,7 @@ void et_fini(struct eacl_table *et)
for (i = 0; i < EE_HASHES; i++) for (i = 0; i < EE_HASHES; i++)
while (!list_empty(&et->et_entries[i])) { while (!list_empty(&et->et_entries[i])) {
ee = list_entry(et->et_entries[i].next, ee = list_entry(et->et_entries[i].next,
struct eacl_entry, ee_list); struct eacl_entry, ee_list);
ee_free(ee); ee_free(ee);
} }
spin_unlock(&et->et_lock); spin_unlock(&et->et_lock);
......
...@@ -462,9 +462,9 @@ static ssize_t ll_max_cached_mb_seq_write(struct file *file, ...@@ -462,9 +462,9 @@ static ssize_t ll_max_cached_mb_seq_write(struct file *file,
/* difficult - have to ask OSCs to drop LRU slots. */ /* difficult - have to ask OSCs to drop LRU slots. */
tmp = diff << 1; tmp = diff << 1;
rc = obd_set_info_async(NULL, sbi->ll_dt_exp, rc = obd_set_info_async(NULL, sbi->ll_dt_exp,
sizeof(KEY_CACHE_LRU_SHRINK), sizeof(KEY_CACHE_LRU_SHRINK),
KEY_CACHE_LRU_SHRINK, KEY_CACHE_LRU_SHRINK,
sizeof(tmp), &tmp, NULL); sizeof(tmp), &tmp, NULL);
if (rc < 0) if (rc < 0)
break; break;
} }
...@@ -1000,7 +1000,7 @@ int ldebugfs_register_mountpoint(struct dentry *parent, ...@@ -1000,7 +1000,7 @@ int ldebugfs_register_mountpoint(struct dentry *parent,
CWARN("Error adding the extent_stats file\n"); CWARN("Error adding the extent_stats file\n");
rc = ldebugfs_seq_create(sbi->ll_debugfs_entry, rc = ldebugfs_seq_create(sbi->ll_debugfs_entry,
"extents_stats_per_process", "extents_stats_per_process",
0644, &ll_rw_extents_stats_pp_fops, sbi); 0644, &ll_rw_extents_stats_pp_fops, sbi);
if (rc) if (rc)
CWARN("Error adding the extents_stats_per_process file\n"); CWARN("Error adding the extents_stats_per_process file\n");
...@@ -1034,7 +1034,7 @@ int ldebugfs_register_mountpoint(struct dentry *parent, ...@@ -1034,7 +1034,7 @@ int ldebugfs_register_mountpoint(struct dentry *parent,
llite_opcode_table[id].opname, ptr); llite_opcode_table[id].opname, ptr);
} }
err = ldebugfs_register_stats(sbi->ll_debugfs_entry, "stats", err = ldebugfs_register_stats(sbi->ll_debugfs_entry, "stats",
sbi->ll_stats); sbi->ll_stats);
if (err) if (err)
goto out; goto out;
...@@ -1050,7 +1050,7 @@ int ldebugfs_register_mountpoint(struct dentry *parent, ...@@ -1050,7 +1050,7 @@ int ldebugfs_register_mountpoint(struct dentry *parent,
ra_stat_string[id], "pages"); ra_stat_string[id], "pages");
err = ldebugfs_register_stats(sbi->ll_debugfs_entry, "read_ahead_stats", err = ldebugfs_register_stats(sbi->ll_debugfs_entry, "read_ahead_stats",
sbi->ll_ra_stats); sbi->ll_ra_stats);
if (err) if (err)
goto out; goto out;
...@@ -1104,7 +1104,7 @@ void ldebugfs_unregister_mountpoint(struct ll_sb_info *sbi) ...@@ -1104,7 +1104,7 @@ void ldebugfs_unregister_mountpoint(struct ll_sb_info *sbi)
#define pct(a, b) (b ? a * 100 / b : 0) #define pct(a, b) (b ? a * 100 / b : 0)
static void ll_display_extents_info(struct ll_rw_extents_info *io_extents, static void ll_display_extents_info(struct ll_rw_extents_info *io_extents,
struct seq_file *seq, int which) struct seq_file *seq, int which)
{ {
unsigned long read_tot = 0, write_tot = 0, read_cum, write_cum; unsigned long read_tot = 0, write_tot = 0, read_cum, write_cum;
unsigned long start, end, r, w; unsigned long start, end, r, w;
......
...@@ -120,9 +120,9 @@ struct inode *ll_iget(struct super_block *sb, ino_t hash, ...@@ -120,9 +120,9 @@ struct inode *ll_iget(struct super_block *sb, ino_t hash,
if (S_ISREG(inode->i_mode) && if (S_ISREG(inode->i_mode) &&
!ll_i2info(inode)->lli_clob) { !ll_i2info(inode)->lli_clob) {
CDEBUG(D_INODE, CDEBUG(D_INODE,
"%s: apply lsm %p to inode "DFID".\n", "%s: apply lsm %p to inode " DFID ".\n",
ll_get_fsname(sb, NULL, 0), md->lsm, ll_get_fsname(sb, NULL, 0), md->lsm,
PFID(ll_inode2fid(inode))); PFID(ll_inode2fid(inode)));
rc = cl_file_inode_init(inode, md); rc = cl_file_inode_init(inode, md);
} }
if (rc != 0) { if (rc != 0) {
...@@ -1016,7 +1016,7 @@ static int ll_symlink(struct inode *dir, struct dentry *dentry, ...@@ -1016,7 +1016,7 @@ static int ll_symlink(struct inode *dir, struct dentry *dentry,
dir, 3000, oldname); dir, 3000, oldname);
err = ll_new_node(dir, dentry, oldname, S_IFLNK | S_IRWXUGO, err = ll_new_node(dir, dentry, oldname, S_IFLNK | S_IRWXUGO,
0, LUSTRE_OPC_SYMLINK); 0, LUSTRE_OPC_SYMLINK);
if (!err) if (!err)
ll_stats_ops_tally(ll_i2sbi(dir), LPROC_LL_SYMLINK, 1); ll_stats_ops_tally(ll_i2sbi(dir), LPROC_LL_SYMLINK, 1);
......
...@@ -626,8 +626,8 @@ static int ll_read_ahead_pages(const struct lu_env *env, ...@@ -626,8 +626,8 @@ static int ll_read_ahead_pages(const struct lu_env *env,
RIA_DEBUG(ria); RIA_DEBUG(ria);
stride_ria = ria->ria_length > ria->ria_pages && ria->ria_pages > 0; stride_ria = ria->ria_length > ria->ria_pages && ria->ria_pages > 0;
for (page_idx = ria->ria_start; page_idx <= ria->ria_end && for (page_idx = ria->ria_start;
*reserved_pages > 0; page_idx++) { page_idx <= ria->ria_end && *reserved_pages > 0; page_idx++) {
if (ras_inside_ra_window(page_idx, ria)) { if (ras_inside_ra_window(page_idx, ria)) {
/* If the page is inside the read-ahead window*/ /* If the page is inside the read-ahead window*/
rc = ll_read_ahead_page(env, io, queue, rc = ll_read_ahead_page(env, io, queue,
...@@ -869,7 +869,7 @@ static void ras_update_stride_detector(struct ll_readahead_state *ras, ...@@ -869,7 +869,7 @@ static void ras_update_stride_detector(struct ll_readahead_state *ras,
unsigned long stride_gap = index - ras->ras_last_readpage - 1; unsigned long stride_gap = index - ras->ras_last_readpage - 1;
if (!stride_io_mode(ras) && (stride_gap != 0 || if (!stride_io_mode(ras) && (stride_gap != 0 ||
ras->ras_consecutive_stride_requests == 0)) { ras->ras_consecutive_stride_requests == 0)) {
ras->ras_stride_pages = ras->ras_consecutive_pages; ras->ras_stride_pages = ras->ras_consecutive_pages;
ras->ras_stride_length = stride_gap+ras->ras_consecutive_pages; ras->ras_stride_length = stride_gap+ras->ras_consecutive_pages;
} }
......
...@@ -481,8 +481,8 @@ static ssize_t ll_direct_IO_26(struct kiocb *iocb, struct iov_iter *iter, ...@@ -481,8 +481,8 @@ static ssize_t ll_direct_IO_26(struct kiocb *iocb, struct iov_iter *iter,
} }
static int ll_write_begin(struct file *file, struct address_space *mapping, static int ll_write_begin(struct file *file, struct address_space *mapping,
loff_t pos, unsigned len, unsigned flags, loff_t pos, unsigned len, unsigned flags,
struct page **pagep, void **fsdata) struct page **pagep, void **fsdata)
{ {
pgoff_t index = pos >> PAGE_CACHE_SHIFT; pgoff_t index = pos >> PAGE_CACHE_SHIFT;
struct page *page; struct page *page;
...@@ -519,8 +519,8 @@ static int ll_write_end(struct file *file, struct address_space *mapping, ...@@ -519,8 +519,8 @@ static int ll_write_end(struct file *file, struct address_space *mapping,
#ifdef CONFIG_MIGRATION #ifdef CONFIG_MIGRATION
static int ll_migratepage(struct address_space *mapping, static int ll_migratepage(struct address_space *mapping,
struct page *newpage, struct page *page, struct page *newpage, struct page *page,
enum migrate_mode mode enum migrate_mode mode
) )
{ {
/* Always fail page migration until we have a proper implementation */ /* Always fail page migration until we have a proper implementation */
......
...@@ -284,7 +284,7 @@ ll_sa_entry_get_byindex(struct ll_statahead_info *sai, __u64 index) ...@@ -284,7 +284,7 @@ ll_sa_entry_get_byindex(struct ll_statahead_info *sai, __u64 index)
} }
static void ll_sa_entry_cleanup(struct ll_statahead_info *sai, static void ll_sa_entry_cleanup(struct ll_statahead_info *sai,
struct ll_sa_entry *entry) struct ll_sa_entry *entry)
{ {
struct md_enqueue_info *minfo = entry->se_minfo; struct md_enqueue_info *minfo = entry->se_minfo;
struct ptlrpc_request *req = entry->se_req; struct ptlrpc_request *req = entry->se_req;
...@@ -303,7 +303,7 @@ static void ll_sa_entry_cleanup(struct ll_statahead_info *sai, ...@@ -303,7 +303,7 @@ static void ll_sa_entry_cleanup(struct ll_statahead_info *sai,
} }
static void ll_sa_entry_put(struct ll_statahead_info *sai, static void ll_sa_entry_put(struct ll_statahead_info *sai,
struct ll_sa_entry *entry) struct ll_sa_entry *entry)
{ {
if (atomic_dec_and_test(&entry->se_refcount)) { if (atomic_dec_and_test(&entry->se_refcount)) {
CDEBUG(D_READA, "free sa entry %.*s(%p) index %llu\n", CDEBUG(D_READA, "free sa entry %.*s(%p) index %llu\n",
...@@ -514,8 +514,8 @@ static void ll_sai_put(struct ll_statahead_info *sai) ...@@ -514,8 +514,8 @@ static void ll_sai_put(struct ll_statahead_info *sai)
PFID(&lli->lli_fid), PFID(&lli->lli_fid),
sai->sai_sent, sai->sai_replied); sai->sai_sent, sai->sai_replied);
list_for_each_entry_safe(entry, next, list_for_each_entry_safe(entry, next, &sai->sai_entries,
&sai->sai_entries, se_link) se_link)
do_sa_entry_fini(sai, entry); do_sa_entry_fini(sai, entry);
LASSERT(list_empty(&sai->sai_entries)); LASSERT(list_empty(&sai->sai_entries));
...@@ -745,7 +745,7 @@ static int ll_statahead_interpret(struct ptlrpc_request *req, ...@@ -745,7 +745,7 @@ static int ll_statahead_interpret(struct ptlrpc_request *req,
entry->se_handle = handle; entry->se_handle = handle;
wakeup = list_empty(&sai->sai_entries_received); wakeup = list_empty(&sai->sai_entries_received);
list_add_tail(&entry->se_list, list_add_tail(&entry->se_list,
&sai->sai_entries_received); &sai->sai_entries_received);
} }
sai->sai_replied++; sai->sai_replied++;
spin_unlock(&lli->lli_sa_lock); spin_unlock(&lli->lli_sa_lock);
...@@ -1013,8 +1013,8 @@ static void ll_start_agl(struct dentry *parent, struct ll_statahead_info *sai) ...@@ -1013,8 +1013,8 @@ static void ll_start_agl(struct dentry *parent, struct ll_statahead_info *sai)
sai, parent); sai, parent);
plli = ll_i2info(d_inode(parent)); plli = ll_i2info(d_inode(parent));
task = kthread_run(ll_agl_thread, parent, task = kthread_run(ll_agl_thread, parent, "ll_agl_%u",
"ll_agl_%u", plli->lli_opendir_pid); plli->lli_opendir_pid);
if (IS_ERR(task)) { if (IS_ERR(task)) {
CERROR("can't start ll_agl thread, rc: %ld\n", PTR_ERR(task)); CERROR("can't start ll_agl thread, rc: %ld\n", PTR_ERR(task));
thread_set_flags(thread, SVC_STOPPED); thread_set_flags(thread, SVC_STOPPED);
...@@ -1583,7 +1583,7 @@ int do_statahead_enter(struct inode *dir, struct dentry **dentryp, ...@@ -1583,7 +1583,7 @@ int do_statahead_enter(struct inode *dir, struct dentry **dentryp,
struct dentry *alias; struct dentry *alias;
alias = ll_splice_alias(inode, alias = ll_splice_alias(inode,
*dentryp); *dentryp);
if (IS_ERR(alias)) { if (IS_ERR(alias)) {
ll_sai_unplug(sai, entry); ll_sai_unplug(sai, entry);
return PTR_ERR(alias); return PTR_ERR(alias);
...@@ -1592,7 +1592,7 @@ int do_statahead_enter(struct inode *dir, struct dentry **dentryp, ...@@ -1592,7 +1592,7 @@ int do_statahead_enter(struct inode *dir, struct dentry **dentryp,
} else if (d_inode(*dentryp) != inode) { } else if (d_inode(*dentryp) != inode) {
/* revalidate, but inode is recreated */ /* revalidate, but inode is recreated */
CDEBUG(D_READA, CDEBUG(D_READA,
"stale dentry %pd inode %lu/%u, statahead inode %lu/%u\n", "stale dentry %pd inode %lu/%u, statahead inode %lu/%u\n",
*dentryp, *dentryp,
d_inode(*dentryp)->i_ino, d_inode(*dentryp)->i_ino,
d_inode(*dentryp)->i_generation, d_inode(*dentryp)->i_generation,
......
...@@ -113,8 +113,8 @@ static int __init init_lustre_lite(void) ...@@ -113,8 +113,8 @@ static int __init init_lustre_lite(void)
goto out_cache; goto out_cache;
ll_file_data_slab = kmem_cache_create("ll_file_data", ll_file_data_slab = kmem_cache_create("ll_file_data",
sizeof(struct ll_file_data), 0, sizeof(struct ll_file_data), 0,
SLAB_HWCACHE_ALIGN, NULL); SLAB_HWCACHE_ALIGN, NULL);
if (!ll_file_data_slab) if (!ll_file_data_slab)
goto out_cache; goto out_cache;
......
...@@ -91,7 +91,7 @@ static int ll_readlink_internal(struct inode *inode, ...@@ -91,7 +91,7 @@ static int ll_readlink_internal(struct inode *inode,
LASSERT(symlen != 0); LASSERT(symlen != 0);
if (body->eadatasize != symlen) { if (body->eadatasize != symlen) {
CERROR("inode %lu: symlink length %d not expected %d\n", CERROR("inode %lu: symlink length %d not expected %d\n",
inode->i_ino, body->eadatasize - 1, symlen - 1); inode->i_ino, body->eadatasize - 1, symlen - 1);
rc = -EPROTO; rc = -EPROTO;
goto failed; goto failed;
} }
......
...@@ -44,14 +44,13 @@ ...@@ -44,14 +44,13 @@
#include "../include/cl_object.h" #include "../include/cl_object.h"
#include "llite_internal.h" #include "llite_internal.h"
int vvp_io_init (const struct lu_env *env, int vvp_io_init(const struct lu_env *env,
struct cl_object *obj, struct cl_io *io); struct cl_object *obj, struct cl_io *io);
int vvp_lock_init (const struct lu_env *env, int vvp_lock_init(const struct lu_env *env,
struct cl_object *obj, struct cl_lock *lock, struct cl_object *obj, struct cl_lock *lock,
const struct cl_io *io); const struct cl_io *io);
int vvp_page_init (const struct lu_env *env, int vvp_page_init(const struct lu_env *env, struct cl_object *obj,
struct cl_object *obj, struct cl_page *page, struct page *vmpage);
struct cl_page *page, struct page *vmpage);
struct lu_object *vvp_object_alloc(const struct lu_env *env, struct lu_object *vvp_object_alloc(const struct lu_env *env,
const struct lu_object_header *hdr, const struct lu_object_header *hdr,
struct lu_device *dev); struct lu_device *dev);
......
...@@ -68,7 +68,7 @@ int cl_is_normalio(const struct lu_env *env, const struct cl_io *io) ...@@ -68,7 +68,7 @@ int cl_is_normalio(const struct lu_env *env, const struct cl_io *io)
* have to acquire group lock. * have to acquire group lock.
*/ */
static bool can_populate_pages(const struct lu_env *env, struct cl_io *io, static bool can_populate_pages(const struct lu_env *env, struct cl_io *io,
struct inode *inode) struct inode *inode)
{ {
struct ll_inode_info *lli = ll_i2info(inode); struct ll_inode_info *lli = ll_i2info(inode);
struct ccc_io *cio = ccc_env_io(env); struct ccc_io *cio = ccc_env_io(env);
...@@ -501,8 +501,8 @@ static int vvp_io_read_start(const struct lu_env *env, ...@@ -501,8 +501,8 @@ static int vvp_io_read_start(const struct lu_env *env,
goto out; goto out;
LU_OBJECT_HEADER(D_INODE, env, &obj->co_lu, LU_OBJECT_HEADER(D_INODE, env, &obj->co_lu,
"Read ino %lu, %lu bytes, offset %lld, size %llu\n", "Read ino %lu, %lu bytes, offset %lld, size %llu\n",
inode->i_ino, cnt, pos, i_size_read(inode)); inode->i_ino, cnt, pos, i_size_read(inode));
/* turn off the kernel's read-ahead */ /* turn off the kernel's read-ahead */
cio->cui_fd->fd_file->f_ra.ra_pages = 0; cio->cui_fd->fd_file->f_ra.ra_pages = 0;
...@@ -527,8 +527,8 @@ static int vvp_io_read_start(const struct lu_env *env, ...@@ -527,8 +527,8 @@ static int vvp_io_read_start(const struct lu_env *env,
break; break;
case IO_SPLICE: case IO_SPLICE:
result = generic_file_splice_read(file, &pos, result = generic_file_splice_read(file, &pos,
vio->u.splice.cui_pipe, cnt, vio->u.splice.cui_pipe, cnt,
vio->u.splice.cui_flags); vio->u.splice.cui_flags);
/* LU-1109: do splice read stripe by stripe otherwise if it /* LU-1109: do splice read stripe by stripe otherwise if it
* may make nfsd stuck if this read occupied all internal pipe * may make nfsd stuck if this read occupied all internal pipe
* buffers. * buffers.
...@@ -1202,8 +1202,8 @@ int vvp_io_init(const struct lu_env *env, struct cl_object *obj, ...@@ -1202,8 +1202,8 @@ int vvp_io_init(const struct lu_env *env, struct cl_object *obj,
result = 0; result = 0;
if (result < 0) if (result < 0)
CERROR("%s: refresh file layout " DFID " error %d.\n", CERROR("%s: refresh file layout " DFID " error %d.\n",
ll_get_fsname(inode->i_sb, NULL, 0), ll_get_fsname(inode->i_sb, NULL, 0),
PFID(lu_object_fid(&obj->co_lu)), result); PFID(lu_object_fid(&obj->co_lu)), result);
} }
return result; return result;
......
...@@ -263,7 +263,7 @@ static void vvp_vmpage_error(struct inode *inode, struct page *vmpage, int ioret ...@@ -263,7 +263,7 @@ static void vvp_vmpage_error(struct inode *inode, struct page *vmpage, int ioret
set_bit(AS_EIO, &inode->i_mapping->flags); set_bit(AS_EIO, &inode->i_mapping->flags);
if ((ioret == -ESHUTDOWN || ioret == -EINTR) && if ((ioret == -ESHUTDOWN || ioret == -EINTR) &&
obj->cob_discard_page_warned == 0) { obj->cob_discard_page_warned == 0) {
obj->cob_discard_page_warned = 1; obj->cob_discard_page_warned = 1;
ll_dirty_page_discard_warn(vmpage, ioret); ll_dirty_page_discard_warn(vmpage, ioret);
} }
...@@ -359,8 +359,7 @@ static int vvp_page_make_ready(const struct lu_env *env, ...@@ -359,8 +359,7 @@ static int vvp_page_make_ready(const struct lu_env *env,
LASSERT(pg->cp_state == CPS_CACHED); LASSERT(pg->cp_state == CPS_CACHED);
/* This actually clears the dirty bit in the radix tree. */ /* This actually clears the dirty bit in the radix tree. */
set_page_writeback(vmpage); set_page_writeback(vmpage);
vvp_write_pending(cl2ccc(slice->cpl_obj), vvp_write_pending(cl2ccc(slice->cpl_obj), cl2ccc_page(slice));
cl2ccc_page(slice));
CL_PAGE_HEADER(D_PAGE, env, pg, "readied\n"); CL_PAGE_HEADER(D_PAGE, env, pg, "readied\n");
} else if (pg->cp_state == CPS_PAGEOUT) { } else if (pg->cp_state == CPS_PAGEOUT) {
/* is it possible for osc_flush_async_page() to already /* is it possible for osc_flush_async_page() to already
...@@ -531,7 +530,7 @@ static const struct cl_page_operations vvp_transient_page_ops = { ...@@ -531,7 +530,7 @@ static const struct cl_page_operations vvp_transient_page_ops = {
}; };
int vvp_page_init(const struct lu_env *env, struct cl_object *obj, int vvp_page_init(const struct lu_env *env, struct cl_object *obj,
struct cl_page *page, struct page *vmpage) struct cl_page *page, struct page *vmpage)
{ {
struct ccc_page *cpg = cl_object_page_slice(obj, page); struct ccc_page *cpg = cl_object_page_slice(obj, page);
...@@ -544,14 +543,13 @@ int vvp_page_init(const struct lu_env *env, struct cl_object *obj, ...@@ -544,14 +543,13 @@ int vvp_page_init(const struct lu_env *env, struct cl_object *obj,
if (page->cp_type == CPT_CACHEABLE) { if (page->cp_type == CPT_CACHEABLE) {
SetPagePrivate(vmpage); SetPagePrivate(vmpage);
vmpage->private = (unsigned long)page; vmpage->private = (unsigned long)page;
cl_page_slice_add(page, &cpg->cpg_cl, obj, cl_page_slice_add(page, &cpg->cpg_cl, obj, &vvp_page_ops);
&vvp_page_ops);
} else { } else {
struct ccc_object *clobj = cl2ccc(obj); struct ccc_object *clobj = cl2ccc(obj);
LASSERT(!inode_trylock(clobj->cob_inode)); LASSERT(!inode_trylock(clobj->cob_inode));
cl_page_slice_add(page, &cpg->cpg_cl, obj, cl_page_slice_add(page, &cpg->cpg_cl, obj,
&vvp_transient_page_ops); &vvp_transient_page_ops);
clobj->cob_transient_pages++; clobj->cob_transient_pages++;
} }
return 0; return 0;
......
...@@ -135,7 +135,7 @@ int ll_setxattr_common(struct inode *inode, const char *name, ...@@ -135,7 +135,7 @@ int ll_setxattr_common(struct inode *inode, const char *name,
/* b15587: ignore security.capability xattr for now */ /* b15587: ignore security.capability xattr for now */
if ((xattr_type == XATTR_SECURITY_T && if ((xattr_type == XATTR_SECURITY_T &&
strcmp(name, "security.capability") == 0)) strcmp(name, "security.capability") == 0))
return 0; return 0;
/* LU-549: Disable security.selinux when selinux is disabled */ /* LU-549: Disable security.selinux when selinux is disabled */
...@@ -311,7 +311,7 @@ int ll_getxattr_common(struct inode *inode, const char *name, ...@@ -311,7 +311,7 @@ int ll_getxattr_common(struct inode *inode, const char *name,
/* b15587: ignore security.capability xattr for now */ /* b15587: ignore security.capability xattr for now */
if ((xattr_type == XATTR_SECURITY_T && if ((xattr_type == XATTR_SECURITY_T &&
strcmp(name, "security.capability") == 0)) strcmp(name, "security.capability") == 0))
return -ENODATA; return -ENODATA;
/* LU-549: Disable security.selinux when selinux is disabled */ /* LU-549: Disable security.selinux when selinux is disabled */
...@@ -397,7 +397,7 @@ int ll_getxattr_common(struct inode *inode, const char *name, ...@@ -397,7 +397,7 @@ int ll_getxattr_common(struct inode *inode, const char *name,
if (size < body->eadatasize) { if (size < body->eadatasize) {
CERROR("server bug: replied size %u > %u\n", CERROR("server bug: replied size %u > %u\n",
body->eadatasize, (int)size); body->eadatasize, (int)size);
rc = -ERANGE; rc = -ERANGE;
goto out; goto out;
} }
...@@ -409,7 +409,7 @@ int ll_getxattr_common(struct inode *inode, const char *name, ...@@ -409,7 +409,7 @@ int ll_getxattr_common(struct inode *inode, const char *name,
/* do not need swab xattr data */ /* do not need swab xattr data */
xdata = req_capsule_server_sized_get(&req->rq_pill, &RMF_EADATA, xdata = req_capsule_server_sized_get(&req->rq_pill, &RMF_EADATA,
body->eadatasize); body->eadatasize);
if (!xdata) { if (!xdata) {
rc = -EFAULT; rc = -EFAULT;
goto out; goto out;
......
...@@ -133,8 +133,8 @@ static int ll_xattr_cache_add(struct list_head *cache, ...@@ -133,8 +133,8 @@ static int ll_xattr_cache_add(struct list_head *cache,
xattr->xe_vallen = xattr_val_len; xattr->xe_vallen = xattr_val_len;
list_add(&xattr->xe_list, cache); list_add(&xattr->xe_list, cache);
CDEBUG(D_CACHE, "set: [%s]=%.*s\n", xattr_name, CDEBUG(D_CACHE, "set: [%s]=%.*s\n", xattr_name, xattr_val_len,
xattr_val_len, xattr_val); xattr_val);
return 0; return 0;
err_value: err_value:
...@@ -191,7 +191,7 @@ static int ll_xattr_cache_list(struct list_head *cache, ...@@ -191,7 +191,7 @@ static int ll_xattr_cache_list(struct list_head *cache,
list_for_each_entry_safe(xattr, tmp, cache, xe_list) { list_for_each_entry_safe(xattr, tmp, cache, xe_list) {
CDEBUG(D_CACHE, "list: buffer=%p[%d] name=%s\n", CDEBUG(D_CACHE, "list: buffer=%p[%d] name=%s\n",
xld_buffer, xld_tail, xattr->xe_name); xld_buffer, xld_tail, xattr->xe_name);
if (xld_buffer) { if (xld_buffer) {
xld_size -= xattr->xe_namelen; xld_size -= xattr->xe_namelen;
...@@ -381,9 +381,9 @@ static int ll_xattr_cache_refill(struct inode *inode, struct lookup_intent *oit) ...@@ -381,9 +381,9 @@ static int ll_xattr_cache_refill(struct inode *inode, struct lookup_intent *oit)
} }
/* do not need swab xattr data */ /* do not need swab xattr data */
xdata = req_capsule_server_sized_get(&req->rq_pill, &RMF_EADATA, xdata = req_capsule_server_sized_get(&req->rq_pill, &RMF_EADATA,
body->eadatasize); body->eadatasize);
xval = req_capsule_server_sized_get(&req->rq_pill, &RMF_EAVALS, xval = req_capsule_server_sized_get(&req->rq_pill, &RMF_EAVALS,
body->aclsize); body->aclsize);
xsizes = req_capsule_server_sized_get(&req->rq_pill, &RMF_EAVALS_LENS, xsizes = req_capsule_server_sized_get(&req->rq_pill, &RMF_EAVALS_LENS,
body->max_mdsize * sizeof(__u32)); body->max_mdsize * sizeof(__u32));
if (!xdata || !xval || !xsizes) { if (!xdata || !xval || !xsizes) {
...@@ -469,11 +469,8 @@ static int ll_xattr_cache_refill(struct inode *inode, struct lookup_intent *oit) ...@@ -469,11 +469,8 @@ static int ll_xattr_cache_refill(struct inode *inode, struct lookup_intent *oit)
* \retval -ERANGE the buffer is not large enough * \retval -ERANGE the buffer is not large enough
* \retval -ENODATA no such attr or the list is empty * \retval -ENODATA no such attr or the list is empty
*/ */
int ll_xattr_cache_get(struct inode *inode, int ll_xattr_cache_get(struct inode *inode, const char *name, char *buffer,
const char *name, size_t size, __u64 valid)
char *buffer,
size_t size,
__u64 valid)
{ {
struct lookup_intent oit = { .it_op = IT_GETXATTR }; struct lookup_intent oit = { .it_op = IT_GETXATTR };
struct ll_inode_info *lli = ll_i2info(inode); struct ll_inode_info *lli = ll_i2info(inode);
...@@ -502,7 +499,7 @@ int ll_xattr_cache_get(struct inode *inode, ...@@ -502,7 +499,7 @@ int ll_xattr_cache_get(struct inode *inode,
if (size != 0) { if (size != 0) {
if (size >= xattr->xe_vallen) if (size >= xattr->xe_vallen)
memcpy(buffer, xattr->xe_value, memcpy(buffer, xattr->xe_value,
xattr->xe_vallen); xattr->xe_vallen);
else else
rc = -ERANGE; rc = -ERANGE;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment