• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/fs/gfs2/

Lines Matching refs:ip

39 static void gfs2_page_add_databufs(struct gfs2_inode *ip, struct page *page,
52 if (gfs2_is_jdata(ip))
54 gfs2_trans_add_bh(ip->i_gl, bh, 0);
99 struct gfs2_inode *ip = GFS2_I(inode);
105 if (gfs2_assert_withdraw(sdp, gfs2_glock_is_held_excl(ip->i_gl)))
153 struct gfs2_inode *ip = GFS2_I(inode);
164 gfs2_page_add_databufs(ip, page, 0, inode->i_sb->s_blocksize-1);
182 struct gfs2_inode *ip = GFS2_I(inode);
191 gfs2_page_add_databufs(ip, page, 0, sdp->sd_vfs->s_blocksize-1);
395 struct gfs2_inode *ip = GFS2_I(mapping->host);
401 gfs2_log_flush(sdp, ip->i_gl);
409 * @ip: the inode
415 static int stuffed_readpage(struct gfs2_inode *ip, struct page *page)
418 u64 dsize = i_size_read(&ip->i_inode);
433 error = gfs2_meta_inode_buffer(ip, &dibh);
464 struct gfs2_inode *ip = GFS2_I(page->mapping->host);
468 if (gfs2_is_stuffed(ip)) {
469 error = stuffed_readpage(ip, page);
494 struct gfs2_inode *ip = GFS2_I(mapping->host);
499 gfs2_holder_init(ip->i_gl, LM_ST_SHARED, 0, &gh);
519 * @ip: The gfs2 inode
527 int gfs2_internal_read(struct gfs2_inode *ip, struct file_ra_state *ra_state,
530 struct address_space *mapping = ip->i_inode.i_mapping;
576 struct gfs2_inode *ip = GFS2_I(inode);
581 gfs2_holder_init(ip->i_gl, LM_ST_SHARED, 0, &gh);
585 if (!gfs2_is_stuffed(ip))
612 struct gfs2_inode *ip = GFS2_I(mapping->host);
624 gfs2_holder_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, &ip->i_gh);
625 error = gfs2_glock_nq(&ip->i_gh);
628 if (&ip->i_inode == sdp->sd_rindex) {
632 gfs2_glock_dq(&ip->i_gh);
637 alloc_required = gfs2_write_alloc_required(ip, pos, len);
639 if (alloc_required || gfs2_is_jdata(ip))
640 gfs2_write_calc_reserv(ip, len, &data_blocks, &ind_blocks);
643 al = gfs2_alloc_get(ip);
649 error = gfs2_quota_lock_check(ip);
654 error = gfs2_inplace_reserve(ip);
660 if (gfs2_is_jdata(ip))
664 if (&ip->i_inode == sdp->sd_rindex)
679 if (gfs2_is_stuffed(ip)) {
682 error = gfs2_unstuff_dinode(ip, page);
686 error = stuffed_readpage(ip, page);
699 if (pos + len > ip->i_inode.i_size)
700 truncate_setsize(&ip->i_inode, ip->i_inode.i_size);
705 gfs2_inplace_release(ip);
707 gfs2_quota_unlock(ip);
709 gfs2_alloc_put(ip);
712 if (&ip->i_inode == sdp->sd_rindex) {
716 gfs2_glock_dq(&ip->i_gh);
718 gfs2_holder_uninit(&ip->i_gh);
779 struct gfs2_inode *ip = GFS2_I(inode);
802 ip->i_disksize = inode->i_size;
804 gfs2_dinode_out(ip, di);
810 ip->i_gh.gh_flags |= GL_NOCACHE;
819 gfs2_glock_dq(&ip->i_gh);
820 gfs2_holder_uninit(&ip->i_gh);
846 struct gfs2_inode *ip = GFS2_I(inode);
850 struct gfs2_alloc *al = ip->i_alloc;
855 BUG_ON(gfs2_glock_is_locked_by_me(ip->i_gl) == NULL);
857 ret = gfs2_meta_inode_buffer(ip, &dibh);
864 gfs2_trans_add_bh(ip->i_gl, dibh, 1);
866 if (gfs2_is_stuffed(ip))
869 if (!gfs2_is_writeback(ip))
870 gfs2_page_add_databufs(ip, page, from, to);
874 if (inode->i_size > ip->i_disksize)
875 ip->i_disksize = inode->i_size;
876 gfs2_dinode_out(ip, dibh->b_data);
882 ip->i_gh.gh_flags |= GL_NOCACHE;
889 gfs2_inplace_release(ip);
890 gfs2_quota_unlock(ip);
891 gfs2_alloc_put(ip);
897 gfs2_glock_dq(&ip->i_gh);
898 gfs2_holder_uninit(&ip->i_gh);
925 struct gfs2_inode *ip = GFS2_I(mapping->host);
930 error = gfs2_glock_nq_init(ip->i_gl, LM_ST_SHARED, LM_FLAG_ANY, &i_gh);
934 if (!gfs2_is_stuffed(ip))
990 * @ip: The inode
997 static int gfs2_ok_for_dio(struct gfs2_inode *ip, int rw, loff_t offset)
1004 if (gfs2_is_stuffed(ip))
1007 if (offset >= i_size_read(&ip->i_inode))
1020 struct gfs2_inode *ip = GFS2_I(inode);
1032 gfs2_holder_init(ip->i_gl, LM_ST_DEFERRED, 0, &gh);
1036 rv = gfs2_ok_for_dio(ip, rw, offset);
1166 struct gfs2_inode *ip = GFS2_I(inode);
1168 if (gfs2_is_writeback(ip))
1170 else if (gfs2_is_ordered(ip))
1172 else if (gfs2_is_jdata(ip))