/fs/xfs/ |
D | xfs_icache.c | 45 struct xfs_perag *pag, struct xfs_inode *ip); 55 struct xfs_inode *ip; in xfs_inode_alloc() local 62 ip = kmem_zone_alloc(xfs_inode_zone, KM_SLEEP); in xfs_inode_alloc() 63 if (!ip) in xfs_inode_alloc() 65 if (inode_init_always(mp->m_super, VFS_I(ip))) { in xfs_inode_alloc() 66 kmem_zone_free(xfs_inode_zone, ip); in xfs_inode_alloc() 70 ASSERT(atomic_read(&ip->i_pincount) == 0); in xfs_inode_alloc() 71 ASSERT(!spin_is_locked(&ip->i_flags_lock)); in xfs_inode_alloc() 72 ASSERT(!xfs_isiflocked(ip)); in xfs_inode_alloc() 73 ASSERT(ip->i_ino == 0); in xfs_inode_alloc() [all …]
|
D | xfs_inode.h | 198 #define XFS_IFORK_Q(ip) ((ip)->i_d.di_forkoff != 0) argument 199 #define XFS_IFORK_BOFF(ip) ((int)((ip)->i_d.di_forkoff << 3)) argument 201 #define XFS_IFORK_PTR(ip,w) \ argument 203 &(ip)->i_df : \ 204 (ip)->i_afp) 205 #define XFS_IFORK_DSIZE(ip) \ argument 206 (XFS_IFORK_Q(ip) ? \ 207 XFS_IFORK_BOFF(ip) : \ 208 XFS_LITINO((ip)->i_mount, (ip)->i_d.di_version)) 209 #define XFS_IFORK_ASIZE(ip) \ argument [all …]
|
D | xfs_inode_item.c | 55 struct xfs_inode *ip = iip->ili_inode; in xfs_inode_item_size() local 58 switch (ip->i_d.di_format) { in xfs_inode_item_size() 61 ip->i_d.di_nextents > 0 && in xfs_inode_item_size() 62 ip->i_df.if_bytes > 0) in xfs_inode_item_size() 68 ip->i_df.if_broot_bytes > 0) in xfs_inode_item_size() 74 ip->i_df.if_bytes > 0) in xfs_inode_item_size() 87 if (!XFS_IFORK_Q(ip)) in xfs_inode_item_size() 94 switch (ip->i_d.di_aformat) { in xfs_inode_item_size() 97 ip->i_d.di_anextents > 0 && in xfs_inode_item_size() 98 ip->i_afp->if_bytes > 0) in xfs_inode_item_size() [all …]
|
D | xfs_inode.c | 70 struct xfs_inode *ip) in xfs_get_extsz_hint() argument 72 if ((ip->i_d.di_flags & XFS_DIFLAG_EXTSIZE) && ip->i_d.di_extsize) in xfs_get_extsz_hint() 73 return ip->i_d.di_extsize; in xfs_get_extsz_hint() 74 if (XFS_IS_REALTIME_INODE(ip)) in xfs_get_extsz_hint() 75 return ip->i_mount->m_sb.sb_rextsize; in xfs_get_extsz_hint() 96 xfs_inode_t *ip) in xfs_ilock_map_shared() argument 100 if ((ip->i_d.di_format == XFS_DINODE_FMT_BTREE) && in xfs_ilock_map_shared() 101 ((ip->i_df.if_flags & XFS_IFEXTENTS) == 0)) { in xfs_ilock_map_shared() 107 xfs_ilock(ip, lock_mode); in xfs_ilock_map_shared() 118 xfs_inode_t *ip, in xfs_iunlock_map_shared() argument [all …]
|
D | xfs_dfrag.c | 39 xfs_inode_t *ip, /* target inode */ 50 xfs_inode_t *ip, *tip; in xfs_swapext() local 87 ip = XFS_I(file_inode(f.file)); in xfs_swapext() 90 if (ip->i_mount != tip->i_mount) { in xfs_swapext() 95 if (ip->i_ino == tip->i_ino) { in xfs_swapext() 100 if (XFS_FORCED_SHUTDOWN(ip->i_mount)) { in xfs_swapext() 105 error = xfs_swap_extents(ip, tip, sxp); in xfs_swapext() 137 xfs_inode_t *ip, /* target inode */ in xfs_swap_extents_check_format() argument 142 if (ip->i_d.di_format == XFS_DINODE_FMT_LOCAL || in xfs_swap_extents_check_format() 150 if (ip->i_d.di_nextents < tip->i_d.di_nextents) in xfs_swap_extents_check_format() [all …]
|
D | xfs_vnodeops.c | 63 xfs_inode_t *ip, in xfs_free_eofblocks() argument 78 end_fsb = XFS_B_TO_FSB(mp, (xfs_ufsize_t)XFS_ISIZE(ip)); in xfs_free_eofblocks() 85 xfs_ilock(ip, XFS_ILOCK_SHARED); in xfs_free_eofblocks() 86 error = xfs_bmapi_read(ip, end_fsb, map_len, &imap, &nimaps, 0); in xfs_free_eofblocks() 87 xfs_iunlock(ip, XFS_ILOCK_SHARED); in xfs_free_eofblocks() 91 ip->i_delayed_blks)) { in xfs_free_eofblocks() 95 error = xfs_qm_dqattach(ip, 0); in xfs_free_eofblocks() 107 if (!xfs_ilock_nowait(ip, XFS_IOLOCK_EXCL)) { in xfs_free_eofblocks() 121 xfs_iunlock(ip, XFS_IOLOCK_EXCL); in xfs_free_eofblocks() 125 xfs_ilock(ip, XFS_ILOCK_EXCL); in xfs_free_eofblocks() [all …]
|
D | xfs_iops.c | 58 struct xfs_inode *ip = XFS_I(inode); in xfs_initxattrs() local 62 error = xfs_attr_set(ip, xattr->name, xattr->value, in xfs_initxattrs() 123 struct xfs_inode *ip = NULL; in xfs_vn_mknod() local 150 error = xfs_create(XFS_I(dir), &name, mode, rdev, &ip); in xfs_vn_mknod() 154 inode = VFS_I(ip); in xfs_vn_mknod() 228 struct xfs_inode *ip; in xfs_vn_ci_lookup() local 238 error = xfs_lookup(XFS_I(dir), &xname, &ip, &ci_name); in xfs_vn_ci_lookup() 252 return d_splice_alias(VFS_I(ip), dentry); in xfs_vn_ci_lookup() 257 dentry = d_add_ci(dentry, VFS_I(ip), &dname); in xfs_vn_ci_lookup() 411 struct xfs_inode *ip = XFS_I(inode); in xfs_vn_getattr() local [all …]
|
D | xfs_iomap.c | 56 xfs_inode_t *ip, in xfs_iomap_eof_align_last_fsb() argument 64 if (!XFS_IS_REALTIME_INODE(ip)) { in xfs_iomap_eof_align_last_fsb() 78 if (align && XFS_ISIZE(ip) >= XFS_FSB_TO_B(mp, align)) in xfs_iomap_eof_align_last_fsb() 95 error = xfs_bmap_eof(ip, new_last_fsb, XFS_DATA_FORK, &eof); in xfs_iomap_eof_align_last_fsb() 106 xfs_inode_t *ip, in xfs_alert_fsblock_zero() argument 109 xfs_alert_tag(ip->i_mount, XFS_PTAG_FSBLOCK_ZERO, in xfs_alert_fsblock_zero() 113 (unsigned long long)ip->i_ino, in xfs_alert_fsblock_zero() 123 xfs_inode_t *ip, in xfs_iomap_write_direct() argument 129 xfs_mount_t *mp = ip->i_mount; in xfs_iomap_write_direct() 145 error = xfs_qm_dqattach(ip, 0); in xfs_iomap_write_direct() [all …]
|
D | xfs_filestream.c | 85 #define TRACE_UPDATE(mp, ip, ag, cnt, ag2, cnt2) \ argument 86 TRACE5(mp, XFS_FSTRM_KTRACE_UPDATE, ip, ag, cnt, ag2, cnt2) 87 #define TRACE_FREE(mp, ip, pip, ag, cnt) \ argument 88 TRACE4(mp, XFS_FSTRM_KTRACE_FREE, ip, pip, ag, cnt) 89 #define TRACE_LOOKUP(mp, ip, pip, ag, cnt) \ argument 90 TRACE4(mp, XFS_FSTRM_KTRACE_ITEM_LOOKUP, ip, pip, ag, cnt) 91 #define TRACE_ASSOCIATE(mp, ip, pip, ag, cnt) \ argument 92 TRACE4(mp, XFS_FSTRM_KTRACE_ASSOCIATE, ip, pip, ag, cnt) 93 #define TRACE_MOVEAG(mp, ip, pip, oag, ocnt, nag, ncnt) \ argument 94 TRACE6(mp, XFS_FSTRM_KTRACE_MOVEAG, ip, pip, oag, ocnt, nag, ncnt) [all …]
|
D | xfs_file.c | 52 struct xfs_inode *ip, in xfs_rw_ilock() argument 56 mutex_lock(&VFS_I(ip)->i_mutex); in xfs_rw_ilock() 57 xfs_ilock(ip, type); in xfs_rw_ilock() 62 struct xfs_inode *ip, in xfs_rw_iunlock() argument 65 xfs_iunlock(ip, type); in xfs_rw_iunlock() 67 mutex_unlock(&VFS_I(ip)->i_mutex); in xfs_rw_iunlock() 72 struct xfs_inode *ip, in xfs_rw_ilock_demote() argument 75 xfs_ilock_demote(ip, type); in xfs_rw_ilock_demote() 77 mutex_unlock(&VFS_I(ip)->i_mutex); in xfs_rw_ilock_demote() 92 struct xfs_inode *ip, /* inode */ in xfs_iozero() argument [all …]
|
D | xfs_utils.c | 66 xfs_inode_t *ip; in xfs_dir_ialloc() local 93 &ialloc_context, &ip); in xfs_dir_ialloc() 104 if (!ialloc_context && !ip) { in xfs_dir_ialloc() 196 okalloc, &ialloc_context, &ip); in xfs_dir_ialloc() 207 ASSERT(!ialloc_context && ip); in xfs_dir_ialloc() 214 *ipp = ip; in xfs_dir_ialloc() 228 xfs_inode_t *ip) in xfs_droplink() argument 232 xfs_trans_ichgtime(tp, ip, XFS_ICHGTIME_CHG); in xfs_droplink() 234 ASSERT (ip->i_d.di_nlink > 0); in xfs_droplink() 235 ip->i_d.di_nlink--; in xfs_droplink() [all …]
|
D | xfs_qm.c | 370 xfs_inode_t *ip, in xfs_qm_dqattach_one() argument 380 ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL)); in xfs_qm_dqattach_one() 436 error = xfs_qm_dqget(ip->i_mount, ip, id, type, in xfs_qm_dqattach_one() 482 struct xfs_inode *ip) in xfs_qm_need_dqattach() argument 484 struct xfs_mount *mp = ip->i_mount; in xfs_qm_need_dqattach() 490 if (!XFS_NOT_DQATTACHED(mp, ip)) in xfs_qm_need_dqattach() 492 if (ip->i_ino == mp->m_sb.sb_uquotino || in xfs_qm_need_dqattach() 493 ip->i_ino == mp->m_sb.sb_gquotino) in xfs_qm_need_dqattach() 507 xfs_inode_t *ip, in xfs_qm_dqattach_locked() argument 510 xfs_mount_t *mp = ip->i_mount; in xfs_qm_dqattach_locked() [all …]
|
D | xfs_bmap.c | 117 xfs_fsb_to_db(struct xfs_inode *ip, xfs_fsblock_t fsb) in xfs_fsb_to_db() argument 119 return (XFS_IS_REALTIME_INODE(ip) ? \ in xfs_fsb_to_db() 120 (xfs_daddr_t)XFS_FSB_TO_BB((ip)->i_mount, (fsb)) : \ in xfs_fsb_to_db() 121 XFS_FSB_TO_DADDR((ip)->i_mount, (fsb))); in xfs_fsb_to_db() 155 static inline bool xfs_bmap_needs_btree(struct xfs_inode *ip, int whichfork) in xfs_bmap_needs_btree() argument 157 return XFS_IFORK_FORMAT(ip, whichfork) == XFS_DINODE_FMT_EXTENTS && in xfs_bmap_needs_btree() 158 XFS_IFORK_NEXTENTS(ip, whichfork) > in xfs_bmap_needs_btree() 159 XFS_IFORK_MAXEXT(ip, whichfork); in xfs_bmap_needs_btree() 165 static inline bool xfs_bmap_wants_extents(struct xfs_inode *ip, int whichfork) in xfs_bmap_wants_extents() argument 167 return XFS_IFORK_FORMAT(ip, whichfork) == XFS_DINODE_FMT_BTREE && in xfs_bmap_wants_extents() [all …]
|
D | xfs_trans_inode.c | 45 struct xfs_inode *ip, in xfs_trans_ijoin() argument 50 ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL)); in xfs_trans_ijoin() 51 if (ip->i_itemp == NULL) in xfs_trans_ijoin() 52 xfs_inode_item_init(ip, ip->i_mount); in xfs_trans_ijoin() 53 iip = ip->i_itemp; in xfs_trans_ijoin() 72 struct xfs_inode *ip, in xfs_trans_ichgtime() argument 75 struct inode *inode = VFS_I(ip); in xfs_trans_ichgtime() 79 ASSERT(xfs_isilocked(ip, XFS_ILOCK_EXCL)); in xfs_trans_ichgtime() 86 ip->i_d.di_mtime.t_sec = tv.tv_sec; in xfs_trans_ichgtime() 87 ip->i_d.di_mtime.t_nsec = tv.tv_nsec; in xfs_trans_ichgtime() [all …]
|
D | xfs_symlink.c | 190 struct xfs_inode *ip, in xfs_symlink_local_to_remote() argument 193 struct xfs_mount *mp = ip->i_mount; in xfs_symlink_local_to_remote() 212 buf += xfs_symlink_hdr_set(mp, ip->i_ino, 0, ifp->if_bytes, bp); in xfs_symlink_local_to_remote() 219 struct xfs_inode *ip, in xfs_readlink_bmap() argument 222 struct xfs_mount *mp = ip->i_mount; in xfs_readlink_bmap() 227 int pathlen = ip->i_d.di_size; in xfs_readlink_bmap() 236 error = xfs_bmapi_read(ip, 0, fsblocks, mval, &nmaps, 0); in xfs_readlink_bmap() 261 if (!xfs_symlink_hdr_ok(mp, ip->i_ino, offset, in xfs_readlink_bmap() 266 offset, byte_cnt, ip->i_ino); in xfs_readlink_bmap() 284 link[ip->i_d.di_size] = '\0'; in xfs_readlink_bmap() [all …]
|
/fs/jfs/ |
D | namei.c | 80 struct inode *ip = NULL; /* child directory inode */ in jfs_create() local 103 ip = ialloc(dip, mode); in jfs_create() 104 if (IS_ERR(ip)) { in jfs_create() 105 rc = PTR_ERR(ip); in jfs_create() 112 mutex_lock_nested(&JFS_IP(ip)->commit_mutex, COMMIT_MUTEX_CHILD); in jfs_create() 114 rc = jfs_init_acl(tid, ip, dip); in jfs_create() 118 rc = jfs_init_security(tid, ip, dip, &dentry->d_name); in jfs_create() 132 tblk->ino = ip->i_ino; in jfs_create() 133 tblk->u.ixpxd = JFS_IP(ip)->ixpxd; in jfs_create() 136 iplist[1] = ip; in jfs_create() [all …]
|
D | jfs_extent.c | 86 extAlloc(struct inode *ip, s64 xlen, s64 pno, xad_t * xp, bool abnr) in extAlloc() argument 88 struct jfs_sb_info *sbi = JFS_SBI(ip->i_sb); in extAlloc() 94 txBeginAnon(ip->i_sb); in extAlloc() 97 mutex_lock(&JFS_IP(ip)->commit_mutex); in extAlloc() 138 if ((rc = extBalloc(ip, hint ? hint : INOHINT(ip), &nxlen, &nxaddr))) { in extAlloc() 139 mutex_unlock(&JFS_IP(ip)->commit_mutex); in extAlloc() 144 rc = dquot_alloc_block(ip, nxlen); in extAlloc() 146 dbFree(ip, nxaddr, (s64) nxlen); in extAlloc() 147 mutex_unlock(&JFS_IP(ip)->commit_mutex); in extAlloc() 159 rc = xtExtend(0, ip, xoff, (int) nxlen, 0); in extAlloc() [all …]
|
D | jfs_xtree.c | 116 static int xtSearch(struct inode *ip, s64 xoff, s64 *next, int *cmpp, 120 struct inode *ip, 123 static int xtSplitPage(tid_t tid, struct inode *ip, struct xtsplit * split, 126 static int xtSplitRoot(tid_t tid, struct inode *ip, 130 static int xtDeleteUp(tid_t tid, struct inode *ip, struct metapage * fmp, 133 static int xtSearchNode(struct inode *ip, 137 static int xtRelink(tid_t tid, struct inode *ip, xtpage_t * fp); 145 int xtLookup(struct inode *ip, s64 lstart, in xtLookup() argument 165 size = ((u64) ip->i_size + (JFS_SBI(ip->i_sb)->bsize - 1)) >> in xtLookup() 166 JFS_SBI(ip->i_sb)->l2bsize; in xtLookup() [all …]
|
D | inode.c | 196 int jfs_get_block(struct inode *ip, sector_t lblock, in jfs_get_block() argument 204 s32 xlen = bh_result->b_size >> ip->i_blkbits; in jfs_get_block() 210 IWRITE_LOCK(ip, RDWRLOCK_NORMAL); in jfs_get_block() 212 IREAD_LOCK(ip, RDWRLOCK_NORMAL); in jfs_get_block() 214 if (((lblock64 << ip->i_sb->s_blocksize_bits) < ip->i_size) && in jfs_get_block() 215 (!xtLookup(ip, lblock64, xlen, &xflag, &xaddr, &xlen, 0)) && in jfs_get_block() 236 rc = extRecord(ip, &xad); in jfs_get_block() 242 map_bh(bh_result, ip->i_sb, xaddr); in jfs_get_block() 243 bh_result->b_size = xlen << ip->i_blkbits; in jfs_get_block() 253 if ((rc = extHint(ip, lblock64 << ip->i_sb->s_blocksize_bits, &xad))) in jfs_get_block() [all …]
|
/fs/gfs2/ |
D | xattr.c | 74 typedef int (*ea_call_t) (struct gfs2_inode *ip, struct buffer_head *bh, 78 static int ea_foreach_i(struct gfs2_inode *ip, struct buffer_head *bh, in ea_foreach_i() argument 84 if (gfs2_metatype_check(GFS2_SB(&ip->i_inode), bh, GFS2_METATYPE_EA)) in ea_foreach_i() 96 error = ea_call(ip, bh, ea, prev, data); in ea_foreach_i() 111 gfs2_consist_inode(ip); in ea_foreach_i() 115 static int ea_foreach(struct gfs2_inode *ip, ea_call_t ea_call, void *data) in ea_foreach() argument 121 error = gfs2_meta_read(ip->i_gl, ip->i_eattr, DIO_WAIT, &bh); in ea_foreach() 125 if (!(ip->i_diskflags & GFS2_DIF_EA_INDIRECT)) { in ea_foreach() 126 error = ea_foreach_i(ip, bh, ea_call, data); in ea_foreach() 130 if (gfs2_metatype_check(GFS2_SB(&ip->i_inode), bh, GFS2_METATYPE_IN)) { in ea_foreach() [all …]
|
D | bmap.c | 56 static int gfs2_unstuffer_page(struct gfs2_inode *ip, struct buffer_head *dibh, in gfs2_unstuffer_page() argument 59 struct inode *inode = &ip->i_inode; in gfs2_unstuffer_page() 94 if (!gfs2_is_jdata(ip)) in gfs2_unstuffer_page() 96 if (!gfs2_is_writeback(ip)) in gfs2_unstuffer_page() 97 gfs2_trans_add_data(ip->i_gl, bh); in gfs2_unstuffer_page() 118 int gfs2_unstuff_dinode(struct gfs2_inode *ip, struct page *page) in gfs2_unstuff_dinode() argument 123 int isdir = gfs2_is_dir(ip); in gfs2_unstuff_dinode() 126 down_write(&ip->i_rw_mutex); in gfs2_unstuff_dinode() 128 error = gfs2_meta_inode_buffer(ip, &dibh); in gfs2_unstuff_dinode() 132 if (i_size_read(&ip->i_inode)) { in gfs2_unstuff_dinode() [all …]
|
D | glops.c | 189 struct gfs2_inode *ip = gl->gl_object; in inode_go_sync() local 193 if (ip && !S_ISREG(ip->i_inode.i_mode)) in inode_go_sync() 194 ip = NULL; in inode_go_sync() 195 if (ip && test_and_clear_bit(GIF_SW_PAGED, &ip->i_flags)) in inode_go_sync() 196 unmap_shared_mapping_range(ip->i_inode.i_mapping, 0, 0); in inode_go_sync() 204 if (ip) { in inode_go_sync() 205 struct address_space *mapping = ip->i_inode.i_mapping; in inode_go_sync() 234 struct gfs2_inode *ip = gl->gl_object; in inode_go_inval() local 241 if (ip) { in inode_go_inval() 242 set_bit(GIF_INVALID, &ip->i_flags); in inode_go_inval() [all …]
|
D | inode.c | 48 struct gfs2_inode *ip = GFS2_I(inode); in iget_test() local 51 if (ip->i_no_addr == data->no_addr) { in iget_test() 64 struct gfs2_inode *ip = GFS2_I(inode); in iget_set() local 70 ip->i_no_addr = data->no_addr; in iget_set() 144 struct gfs2_inode *ip; in gfs2_inode_lookup() local 149 ip = GFS2_I(inode); in gfs2_inode_lookup() 156 ip->i_no_formal_ino = no_formal_ino; in gfs2_inode_lookup() 158 error = gfs2_glock_get(sdp, no_addr, &gfs2_inode_glops, CREATE, &ip->i_gl); in gfs2_inode_lookup() 161 ip->i_gl->gl_object = ip; in gfs2_inode_lookup() 167 set_bit(GIF_INVALID, &ip->i_flags); in gfs2_inode_lookup() [all …]
|
D | file.c | 58 struct gfs2_inode *ip = GFS2_I(file->f_mapping->host); in gfs2_llseek() local 66 error = gfs2_glock_nq_init(ip->i_gl, LM_ST_SHARED, LM_FLAG_ANY, in gfs2_llseek() 162 struct gfs2_inode *ip = GFS2_I(inode); in gfs2_get_flags() local 167 gfs2_holder_init(ip->i_gl, LM_ST_SHARED, 0, &gh); in gfs2_get_flags() 172 fsflags = fsflags_cvt(gfs2_to_fsflags, ip->i_diskflags); in gfs2_get_flags() 173 if (!S_ISDIR(inode->i_mode) && ip->i_diskflags & GFS2_DIF_JDATA) in gfs2_get_flags() 185 struct gfs2_inode *ip = GFS2_I(inode); in gfs2_set_inode_flags() local 189 if ((ip->i_eattr == 0) && !is_sxid(inode->i_mode)) in gfs2_set_inode_flags() 191 if (ip->i_diskflags & GFS2_DIF_IMMUTABLE) in gfs2_set_inode_flags() 193 if (ip->i_diskflags & GFS2_DIF_APPENDONLY) in gfs2_set_inode_flags() [all …]
|
/fs/freevxfs/ |
D | vxfs_inode.c | 223 vxfs_iinit(struct inode *ip, struct vxfs_inode_info *vip) in vxfs_iinit() argument 226 ip->i_mode = vxfs_transmod(vip); in vxfs_iinit() 227 i_uid_write(ip, (uid_t)vip->vii_uid); in vxfs_iinit() 228 i_gid_write(ip, (gid_t)vip->vii_gid); in vxfs_iinit() 230 set_nlink(ip, vip->vii_nlink); in vxfs_iinit() 231 ip->i_size = vip->vii_size; in vxfs_iinit() 233 ip->i_atime.tv_sec = vip->vii_atime; in vxfs_iinit() 234 ip->i_ctime.tv_sec = vip->vii_ctime; in vxfs_iinit() 235 ip->i_mtime.tv_sec = vip->vii_mtime; in vxfs_iinit() 236 ip->i_atime.tv_nsec = 0; in vxfs_iinit() [all …]
|