Lines Matching refs:ip

60 	struct gfs2_inode *ip = GFS2_I(file->f_mapping->host);
66 error = gfs2_glock_nq_init(ip->i_gl, LM_ST_SHARED, LM_FLAG_ANY,
161 struct gfs2_inode *ip = GFS2_I(inode);
169 gfs2_holder_init(ip->i_gl, LM_ST_SHARED, 0, &gh);
174 fsflags = gfs2_gfsflags_to_fsflags(inode, ip->i_diskflags);
186 struct gfs2_inode *ip = GFS2_I(inode);
190 if ((ip->i_eattr == 0) && !is_sxid(inode->i_mode))
192 if (ip->i_diskflags & GFS2_DIF_IMMUTABLE)
194 if (ip->i_diskflags & GFS2_DIF_APPENDONLY)
196 if (ip->i_diskflags & GFS2_DIF_NOATIME)
198 if (ip->i_diskflags & GFS2_DIF_SYNC)
221 struct gfs2_inode *ip = GFS2_I(inode);
228 error = gfs2_glock_nq_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, &gh);
233 flags = ip->i_diskflags;
245 gfs2_log_flush(sdp, ip->i_gl,
255 gfs2_ordered_del_inode(ip);
260 error = gfs2_meta_inode_buffer(ip, &bh);
264 gfs2_trans_add_meta(ip->i_gl, bh);
265 ip->i_diskflags = new_flags;
266 gfs2_dinode_out(ip, bh->b_data);
370 struct gfs2_inode *ip = GFS2_I(inode);
374 if (hint > atomic_read(&ip->i_sizehint))
375 atomic_set(&ip->i_sizehint, hint);
419 struct gfs2_inode *ip = GFS2_I(inode);
432 gfs2_holder_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, &gh);
457 set_bit(GLF_DIRTY, &ip->i_gl->gl_flags);
458 set_bit(GIF_SW_PAGED, &ip->i_flags);
465 if (!gfs2_is_stuffed(ip) &&
466 !gfs2_write_alloc_required(ip, pos, length)) {
482 gfs2_write_calc_reserv(ip, length, &data_blocks, &ind_blocks);
484 err = gfs2_quota_lock_check(ip, &ap);
489 err = gfs2_inplace_reserve(ip, &ap);
496 if (gfs2_is_jdata(ip))
500 rblocks += gfs2_rg_blocks(ip, data_blocks + ind_blocks);
509 if (gfs2_is_stuffed(ip)) {
510 err = gfs2_unstuff_dinode(ip);
536 gfs2_inplace_release(ip);
538 gfs2_quota_unlock(ip);
554 struct gfs2_inode *ip = GFS2_I(inode);
559 gfs2_holder_init(ip->i_gl, LM_ST_SHARED, 0, &gh);
592 struct gfs2_inode *ip = GFS2_I(file->f_mapping->host);
595 !IS_NOATIME(&ip->i_inode)) {
599 error = gfs2_glock_nq_init(ip->i_gl, LM_ST_SHARED, LM_FLAG_ANY,
676 struct gfs2_inode *ip = GFS2_I(inode);
681 if (S_ISREG(ip->i_inode.i_mode)) {
682 error = gfs2_glock_nq_init(ip->i_gl, LM_ST_SHARED, LM_FLAG_ANY,
707 struct gfs2_inode *ip = GFS2_I(inode);
713 if (gfs2_rs_active(&ip->i_res))
714 gfs2_rs_delete(ip);
715 gfs2_qa_put(ip);
747 struct gfs2_inode *ip = GFS2_I(inode);
756 if (!gfs2_is_jdata(ip))
765 if (gfs2_is_jdata(ip))
769 gfs2_ail_flush(ip->i_gl, 1);
814 struct gfs2_inode *ip = GFS2_I(file->f_mapping->host);
839 gfs2_holder_init(ip->i_gl, LM_ST_DEFERRED, 0, gh);
878 struct gfs2_inode *ip = GFS2_I(inode);
902 gfs2_holder_init(ip->i_gl, LM_ST_DEFERRED, 0, gh);
908 if (iocb->ki_pos + iov_iter_count(from) > i_size_read(&ip->i_inode))
950 struct gfs2_inode *ip;
981 ip = GFS2_I(iocb->ki_filp->f_mapping->host);
982 gfs2_holder_init(ip->i_gl, LM_ST_SHARED, 0, &gh);
1015 struct gfs2_inode *ip = GFS2_I(inode);
1036 gfs2_holder_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, gh);
1102 struct gfs2_inode *ip = GFS2_I(inode);
1109 ret = gfs2_glock_nq_init(ip->i_gl, LM_ST_SHARED, 0, &gh);
1178 struct gfs2_inode *ip = GFS2_I(inode);
1183 error = gfs2_meta_inode_buffer(ip, &dibh);
1187 gfs2_trans_add_meta(ip->i_gl, dibh);
1189 if (gfs2_is_stuffed(ip)) {
1190 error = gfs2_unstuff_dinode(ip);
1220 * @ip: The inode in question.
1228 static void calc_max_reserv(struct gfs2_inode *ip, loff_t *len,
1233 const struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode);
1246 gfs2_write_calc_reserv(ip, max, data_blocks, ind_blocks);
1254 struct gfs2_inode *ip = GFS2_I(inode);
1279 gfs2_write_calc_reserv(ip, PAGE_SIZE, &data_blocks, &ind_blocks);
1285 if (!gfs2_write_alloc_required(ip, offset, bytes)) {
1301 gfs2_write_calc_reserv(ip, bytes, &data_blocks, &ind_blocks);
1304 error = gfs2_quota_lock_check(ip, &ap);
1313 error = gfs2_inplace_reserve(ip, &ap);
1318 if (ip->i_res.rs_reserved < max_blks)
1319 max_blks = ip->i_res.rs_reserved;
1324 calc_max_reserv(ip, &max_bytes, &data_blocks,
1328 RES_RG_HDR + gfs2_rg_blocks(ip, data_blocks + ind_blocks);
1329 if (gfs2_is_jdata(ip))
1345 gfs2_inplace_release(ip);
1346 gfs2_quota_unlock(ip);
1360 gfs2_inplace_release(ip);
1362 gfs2_quota_unlock(ip);
1370 struct gfs2_inode *ip = GFS2_I(inode);
1377 if (gfs2_is_jdata(ip) && inode != sdp->sd_rindex)
1382 gfs2_holder_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, &gh);
1403 gfs2_rs_deltree(&ip->i_res);
1440 struct gfs2_inode *ip = GFS2_I(file->f_mapping->host);
1452 return dlm_posix_cancel(ls->ls_dlm, ip->i_no_addr, file, fl);
1454 return dlm_posix_get(ls->ls_dlm, ip->i_no_addr, file, fl);
1456 return dlm_posix_unlock(ls->ls_dlm, ip->i_no_addr, file, fl);
1458 return dlm_posix_lock(ls->ls_dlm, ip->i_no_addr, file, cmd, fl);
1480 struct gfs2_inode *ip = GFS2_I(file_inode(file));
1505 error = gfs2_glock_get(GFS2_SB(&ip->i_inode), ip->i_no_addr,
1528 gfs2_assert_warn(GFS2_SB(&ip->i_inode), !error);