Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ====================================================================================================================================================================================
- Variable: inode->i_ctime Addresses: c110aac1 c10b79ec
- c110aac1 ext4_encode_extra_time /linux-3.13.5/fs/ext4/ext4.h:729
- c10b79ec update_time /linux-3.13.5/fs/inode.c:1510
- c10b79ec <-> c110aac1
- c10b79ec <-> c110aac1
- /linux-3.13.5/fs/ext4/ext4.h:729
- 719 * inode-size = GOOD_OLD_INODE_SIZE + i_extra_isize
- 720 */
- 721 #define EXT4_FITS_IN_INODE(ext4_inode, einode, field) \
- 722 ((offsetof(typeof(*ext4_inode), field) + \
- 723 sizeof((ext4_inode)->field)) \
- 724 <= (EXT4_GOOD_OLD_INODE_SIZE + \
- 725 (einode)->i_extra_isize)) \
- 726
- 727 static inline __le32 ext4_encode_extra_time(struct timespec *time)
- 728 {
- ==> 729 return cpu_to_le32((sizeof(time->tv_sec) > 4 ?
- 730 (time->tv_sec >> 32) & EXT4_EPOCH_MASK : 0) |
- 731 ((time->tv_nsec << EXT4_EPOCH_BITS) & EXT4_NSEC_MASK));
- 732 }
- 733
- 734 static inline void ext4_decode_extra_time(struct timespec *time, __le32 extra)
- 735 {
- 736 if (sizeof(time->tv_sec) > 4)
- 737 time->tv_sec |= (__u64)(le32_to_cpu(extra) & EXT4_EPOCH_MASK)
- 738 << 32;
- 739 time->tv_nsec = (le32_to_cpu(extra) & EXT4_NSEC_MASK) >> EXT4_EPOCH_BITS;
- /linux-3.13.5/fs/inode.c:1510
- 1500 static int update_time(struct inode *inode, struct timespec *time, int flags)
- 1501 {
- 1502 if (inode->i_op->update_time)
- 1503 return inode->i_op->update_time(inode, time, flags);
- 1504
- 1505 if (flags & S_ATIME)
- 1506 inode->i_atime = *time;
- 1507 if (flags & S_VERSION)
- 1508 inode_inc_iversion(inode);
- 1509 if (flags & S_CTIME)
- ==> 1510 inode->i_ctime = *time;
- 1511 if (flags & S_MTIME)
- 1512 inode->i_mtime = *time;
- 1513 mark_inode_dirty_sync(inode);
- 1514 return 0;
- 1515 }
- 1516
- 1517 /**
- 1518 * touch_atime - update the access time
- 1519 * @path: the &struct path to update
- 1520 *
- ====================================================================================================================================================================================
- Variable: i_crtime Addresses: c110ab4a
- c110ab4a ext4_encode_extra_time /linux-3.13.5/fs/ext4/ext4.h:729
- c110ab4a <-> c110ab4a
- /linux-3.13.5/fs/ext4/ext4.h:729
- 719 * inode-size = GOOD_OLD_INODE_SIZE + i_extra_isize
- 720 */
- 721 #define EXT4_FITS_IN_INODE(ext4_inode, einode, field) \
- 722 ((offsetof(typeof(*ext4_inode), field) + \
- 723 sizeof((ext4_inode)->field)) \
- 724 <= (EXT4_GOOD_OLD_INODE_SIZE + \
- 725 (einode)->i_extra_isize)) \
- 726
- 727 static inline __le32 ext4_encode_extra_time(struct timespec *time)
- 728 {
- ==> 729 return cpu_to_le32((sizeof(time->tv_sec) > 4 ?
- 730 (time->tv_sec >> 32) & EXT4_EPOCH_MASK : 0) |
- 731 ((time->tv_nsec << EXT4_EPOCH_BITS) & EXT4_NSEC_MASK));
- 732 }
- 733
- 734 static inline void ext4_decode_extra_time(struct timespec *time, __le32 extra)
- 735 {
- 736 if (sizeof(time->tv_sec) > 4)
- 737 time->tv_sec |= (__u64)(le32_to_cpu(extra) & EXT4_EPOCH_MASK)
- 738 << 32;
- 739 time->tv_nsec = (le32_to_cpu(extra) & EXT4_NSEC_MASK) >> EXT4_EPOCH_BITS;
- ====================================================================================================================================================================================
- Variable: ei->i_disksize Addresses: c110c813 c110ac06
- c110c813 ext4_wb_update_i_disksize /linux-3.13.5/fs/ext4/ext4.h:2476
- c110ac06 ext4_do_update_inode /linux-3.13.5/fs/ext4/inode.c:4342
- c110c813 <-> c110ac06
- c110c813 <-> c110ac06
- /linux-3.13.5/fs/ext4/ext4.h:2476
- 2466 */
- 2467 static inline void ext4_wb_update_i_disksize(struct inode *inode, loff_t newsize)
- 2468 {
- 2469 loff_t i_size;
- 2470
- 2471 down_write(&EXT4_I(inode)->i_data_sem);
- 2472 i_size = i_size_read(inode);
- 2473 if (newsize > i_size)
- 2474 newsize = i_size;
- 2475 if (newsize > EXT4_I(inode)->i_disksize)
- ==> 2476 EXT4_I(inode)->i_disksize = newsize;
- 2477 up_write(&EXT4_I(inode)->i_data_sem);
- 2478 }
- 2479
- 2480 struct ext4_group_info {
- 2481 unsigned long bb_state;
- 2482 struct rb_root bb_free_root;
- 2483 ext4_grpblk_t bb_first_free; /* first free block */
- 2484 ext4_grpblk_t bb_free; /* total free blocks */
- 2485 ext4_grpblk_t bb_fragments; /* nr of freespace fragments */
- 2486 ext4_grpblk_t bb_largest_free_order;/* order of largest frag in BG */
- /linux-3.13.5/fs/ext4/inode.c:4342
- 4332 raw_inode->i_flags = cpu_to_le32(ei->i_flags & 0xFFFFFFFF);
- 4333 if (EXT4_SB(inode->i_sb)->s_es->s_creator_os !=
- 4334 cpu_to_le32(EXT4_OS_HURD))
- 4335 raw_inode->i_file_acl_high =
- 4336 cpu_to_le16(ei->i_file_acl >> 32);
- 4337 raw_inode->i_file_acl_lo = cpu_to_le32(ei->i_file_acl);
- 4338 if (ei->i_disksize != ext4_isize(raw_inode)) {
- 4339 ext4_isize_set(raw_inode, ei->i_disksize);
- 4340 need_datasync = 1;
- 4341 }
- ==> 4342 if (ei->i_disksize > 0x7fffffffULL) {
- 4343 struct super_block *sb = inode->i_sb;
- 4344 if (!EXT4_HAS_RO_COMPAT_FEATURE(sb,
- 4345 EXT4_FEATURE_RO_COMPAT_LARGE_FILE) ||
- 4346 EXT4_SB(sb)->s_es->s_rev_level ==
- 4347 cpu_to_le32(EXT4_GOOD_OLD_REV)) {
- 4348 /* If this is the first large file
- 4349 * created, add a flag to the superblock.
- 4350 */
- 4351 err = ext4_journal_get_write_access(handle,
- 4352 EXT4_SB(sb)->s_sbh);
- ====================================================================================================================================================================================
- Variable: raw_inode->i_gid_high Addresses: c110aa6a
- c110aa6a ext4_do_update_inode /linux-3.13.5/fs/ext4/inode.c:4311
- c110aa6a <-> c110aa6a
- /linux-3.13.5/fs/ext4/inode.c:4311
- 4301 raw_inode->i_uid_low = cpu_to_le16(low_16_bits(i_uid));
- 4302 raw_inode->i_gid_low = cpu_to_le16(low_16_bits(i_gid));
- 4303 /*
- 4304 * Fix up interoperability with old kernels. Otherwise, old inodes get
- 4305 * re-used with the upper 16 bits of the uid/gid intact
- 4306 */
- 4307 if (!ei->i_dtime) {
- 4308 raw_inode->i_uid_high =
- 4309 cpu_to_le16(high_16_bits(i_uid));
- 4310 raw_inode->i_gid_high =
- ==> 4311 cpu_to_le16(high_16_bits(i_gid));
- 4312 } else {
- 4313 raw_inode->i_uid_high = 0;
- 4314 raw_inode->i_gid_high = 0;
- 4315 }
- 4316 } else {
- 4317 raw_inode->i_uid_low = cpu_to_le16(fs_high2lowuid(i_uid));
- 4318 raw_inode->i_gid_low = cpu_to_le16(fs_high2lowgid(i_gid));
- 4319 raw_inode->i_uid_high = 0;
- 4320 raw_inode->i_gid_high = 0;
- 4321 }
- ====================================================================================================================================================================================
- Variable: raw_inode->i_dtime Addresses: c110adf2
- c110adf2 ext4_do_update_inode /linux-3.13.5/fs/ext4/inode.c:4331
- c110adf2 <-> c110adf2
- /linux-3.13.5/fs/ext4/inode.c:4331
- 4321 }
- 4322 raw_inode->i_links_count = cpu_to_le16(inode->i_nlink);
- 4323
- 4324 EXT4_INODE_SET_XTIME(i_ctime, inode, raw_inode);
- 4325 EXT4_INODE_SET_XTIME(i_mtime, inode, raw_inode);
- 4326 EXT4_INODE_SET_XTIME(i_atime, inode, raw_inode);
- 4327 EXT4_EINODE_SET_XTIME(i_crtime, ei, raw_inode);
- 4328
- 4329 if (ext4_inode_blocks_set(handle, raw_inode, ei))
- 4330 goto out_brelse;
- ==> 4331 raw_inode->i_dtime = cpu_to_le32(ei->i_dtime);
- 4332 raw_inode->i_flags = cpu_to_le32(ei->i_flags & 0xFFFFFFFF);
- 4333 if (EXT4_SB(inode->i_sb)->s_es->s_creator_os !=
- 4334 cpu_to_le32(EXT4_OS_HURD))
- 4335 raw_inode->i_file_acl_high =
- 4336 cpu_to_le16(ei->i_file_acl >> 32);
- 4337 raw_inode->i_file_acl_lo = cpu_to_le32(ei->i_file_acl);
- 4338 if (ei->i_disksize != ext4_isize(raw_inode)) {
- 4339 ext4_isize_set(raw_inode, ei->i_disksize);
- 4340 need_datasync = 1;
- 4341 }
- ====================================================================================================================================================================================
- Variable: i_mtime Addresses: c110aac7
- c110aac7 ext4_encode_extra_time /linux-3.13.5/fs/ext4/ext4.h:729
- c110aac7 <-> c110aac7
- /linux-3.13.5/fs/ext4/ext4.h:729
- 719 * inode-size = GOOD_OLD_INODE_SIZE + i_extra_isize
- 720 */
- 721 #define EXT4_FITS_IN_INODE(ext4_inode, einode, field) \
- 722 ((offsetof(typeof(*ext4_inode), field) + \
- 723 sizeof((ext4_inode)->field)) \
- 724 <= (EXT4_GOOD_OLD_INODE_SIZE + \
- 725 (einode)->i_extra_isize)) \
- 726
- 727 static inline __le32 ext4_encode_extra_time(struct timespec *time)
- 728 {
- ==> 729 return cpu_to_le32((sizeof(time->tv_sec) > 4 ?
- 730 (time->tv_sec >> 32) & EXT4_EPOCH_MASK : 0) |
- 731 ((time->tv_nsec << EXT4_EPOCH_BITS) & EXT4_NSEC_MASK));
- 732 }
- 733
- 734 static inline void ext4_decode_extra_time(struct timespec *time, __le32 extra)
- 735 {
- 736 if (sizeof(time->tv_sec) > 4)
- 737 time->tv_sec |= (__u64)(le32_to_cpu(extra) & EXT4_EPOCH_MASK)
- 738 << 32;
- 739 time->tv_nsec = (le32_to_cpu(extra) & EXT4_NSEC_MASK) >> EXT4_EPOCH_BITS;
- ====================================================================================================================================================================================
- Variable: i_mtime Addresses: c110aad0
- c110aad0 ext4_do_update_inode /linux-3.13.5/fs/ext4/inode.c:4325
- c110aad0 <-> c110aad0
- /linux-3.13.5/fs/ext4/inode.c:4325
- 4315 }
- 4316 } else {
- 4317 raw_inode->i_uid_low = cpu_to_le16(fs_high2lowuid(i_uid));
- 4318 raw_inode->i_gid_low = cpu_to_le16(fs_high2lowgid(i_gid));
- 4319 raw_inode->i_uid_high = 0;
- 4320 raw_inode->i_gid_high = 0;
- 4321 }
- 4322 raw_inode->i_links_count = cpu_to_le16(inode->i_nlink);
- 4323
- 4324 EXT4_INODE_SET_XTIME(i_ctime, inode, raw_inode);
- ==> 4325 EXT4_INODE_SET_XTIME(i_mtime, inode, raw_inode);
- 4326 EXT4_INODE_SET_XTIME(i_atime, inode, raw_inode);
- 4327 EXT4_EINODE_SET_XTIME(i_crtime, ei, raw_inode);
- 4328
- 4329 if (ext4_inode_blocks_set(handle, raw_inode, ei))
- 4330 goto out_brelse;
- 4331 raw_inode->i_dtime = cpu_to_le32(ei->i_dtime);
- 4332 raw_inode->i_flags = cpu_to_le32(ei->i_flags & 0xFFFFFFFF);
- 4333 if (EXT4_SB(inode->i_sb)->s_es->s_creator_os !=
- 4334 cpu_to_le32(EXT4_OS_HURD))
- 4335 raw_inode->i_file_acl_high =
- ====================================================================================================================================================================================
- Variable: raw_inode->i_file_acl_high Addresses: c110abbf
- c110abbf ext4_do_update_inode /linux-3.13.5/fs/ext4/inode.c:4336
- c110abbf <-> c110abbf
- /linux-3.13.5/fs/ext4/inode.c:4336
- 4326 EXT4_INODE_SET_XTIME(i_atime, inode, raw_inode);
- 4327 EXT4_EINODE_SET_XTIME(i_crtime, ei, raw_inode);
- 4328
- 4329 if (ext4_inode_blocks_set(handle, raw_inode, ei))
- 4330 goto out_brelse;
- 4331 raw_inode->i_dtime = cpu_to_le32(ei->i_dtime);
- 4332 raw_inode->i_flags = cpu_to_le32(ei->i_flags & 0xFFFFFFFF);
- 4333 if (EXT4_SB(inode->i_sb)->s_es->s_creator_os !=
- 4334 cpu_to_le32(EXT4_OS_HURD))
- 4335 raw_inode->i_file_acl_high =
- ==> 4336 cpu_to_le16(ei->i_file_acl >> 32);
- 4337 raw_inode->i_file_acl_lo = cpu_to_le32(ei->i_file_acl);
- 4338 if (ei->i_disksize != ext4_isize(raw_inode)) {
- 4339 ext4_isize_set(raw_inode, ei->i_disksize);
- 4340 need_datasync = 1;
- 4341 }
- 4342 if (ei->i_disksize > 0x7fffffffULL) {
- 4343 struct super_block *sb = inode->i_sb;
- 4344 if (!EXT4_HAS_RO_COMPAT_FEATURE(sb,
- 4345 EXT4_FEATURE_RO_COMPAT_LARGE_FILE) ||
- 4346 EXT4_SB(sb)->s_es->s_rev_level ==
- ====================================================================================================================================================================================
- Variable: iraw_inode->i_flags Addresses: c110adf8
- c110adf8 ext4_do_update_inode /linux-3.13.5/fs/ext4/inode.c:4332
- c110adf8 <-> c110adf8
- /linux-3.13.5/fs/ext4/inode.c:4332
- 4322 raw_inode->i_links_count = cpu_to_le16(inode->i_nlink);
- 4323
- 4324 EXT4_INODE_SET_XTIME(i_ctime, inode, raw_inode);
- 4325 EXT4_INODE_SET_XTIME(i_mtime, inode, raw_inode);
- 4326 EXT4_INODE_SET_XTIME(i_atime, inode, raw_inode);
- 4327 EXT4_EINODE_SET_XTIME(i_crtime, ei, raw_inode);
- 4328
- 4329 if (ext4_inode_blocks_set(handle, raw_inode, ei))
- 4330 goto out_brelse;
- 4331 raw_inode->i_dtime = cpu_to_le32(ei->i_dtime);
- ==> 4332 raw_inode->i_flags = cpu_to_le32(ei->i_flags & 0xFFFFFFFF);
- 4333 if (EXT4_SB(inode->i_sb)->s_es->s_creator_os !=
- 4334 cpu_to_le32(EXT4_OS_HURD))
- 4335 raw_inode->i_file_acl_high =
- 4336 cpu_to_le16(ei->i_file_acl >> 32);
- 4337 raw_inode->i_file_acl_lo = cpu_to_le32(ei->i_file_acl);
- 4338 if (ei->i_disksize != ext4_isize(raw_inode)) {
- 4339 ext4_isize_set(raw_inode, ei->i_disksize);
- 4340 need_datasync = 1;
- 4341 }
- 4342 if (ei->i_disksize > 0x7fffffffULL) {
- ====================================================================================================================================================================================
- Variable: raw_inode->i_file_acl_lo Addresses: c110abc6
- c110abc6 ext4_do_update_inode /linux-3.13.5/fs/ext4/inode.c:4337
- c110abc6 <-> c110abc6
- /linux-3.13.5/fs/ext4/inode.c:4337
- 4327 EXT4_EINODE_SET_XTIME(i_crtime, ei, raw_inode);
- 4328
- 4329 if (ext4_inode_blocks_set(handle, raw_inode, ei))
- 4330 goto out_brelse;
- 4331 raw_inode->i_dtime = cpu_to_le32(ei->i_dtime);
- 4332 raw_inode->i_flags = cpu_to_le32(ei->i_flags & 0xFFFFFFFF);
- 4333 if (EXT4_SB(inode->i_sb)->s_es->s_creator_os !=
- 4334 cpu_to_le32(EXT4_OS_HURD))
- 4335 raw_inode->i_file_acl_high =
- 4336 cpu_to_le16(ei->i_file_acl >> 32);
- ==> 4337 raw_inode->i_file_acl_lo = cpu_to_le32(ei->i_file_acl);
- 4338 if (ei->i_disksize != ext4_isize(raw_inode)) {
- 4339 ext4_isize_set(raw_inode, ei->i_disksize);
- 4340 need_datasync = 1;
- 4341 }
- 4342 if (ei->i_disksize > 0x7fffffffULL) {
- 4343 struct super_block *sb = inode->i_sb;
- 4344 if (!EXT4_HAS_RO_COMPAT_FEATURE(sb,
- 4345 EXT4_FEATURE_RO_COMPAT_LARGE_FILE) ||
- 4346 EXT4_SB(sb)->s_es->s_rev_level ==
- 4347 cpu_to_le32(EXT4_GOOD_OLD_REV)) {
- ====================================================================================================================================================================================
- Variable: raw_inode->i_blocks_lo Addresses: c110ab5e
- c110ab5e ext4_inode_blocks_set /linux-3.13.5/fs/ext4/inode.c:4246
- c110ab5e <-> c110ab5e
- /linux-3.13.5/fs/ext4/inode.c:4246
- 4236 {
- 4237 struct inode *inode = &(ei->vfs_inode);
- 4238 u64 i_blocks = inode->i_blocks;
- 4239 struct super_block *sb = inode->i_sb;
- 4240
- 4241 if (i_blocks <= ~0U) {
- 4242 /*
- 4243 * i_blocks can be represented in a 32 bit variable
- 4244 * as multiple of 512 bytes
- 4245 */
- ==> 4246 raw_inode->i_blocks_lo = cpu_to_le32(i_blocks);
- 4247 raw_inode->i_blocks_high = 0;
- 4248 ext4_clear_inode_flag(inode, EXT4_INODE_HUGE_FILE);
- 4249 return 0;
- 4250 }
- 4251 if (!EXT4_HAS_RO_COMPAT_FEATURE(sb, EXT4_FEATURE_RO_COMPAT_HUGE_FILE))
- 4252 return -EFBIG;
- 4253
- 4254 if (i_blocks <= 0xffffffffffffULL) {
- 4255 /*
- 4256 * i_blocks can be represented in a 48 bit variable
- ====================================================================================================================================================================================
- Variable: raw_inode->i_links_count Addresses: c110aaa6
- c110aaa6 ext4_do_update_inode /linux-3.13.5/fs/ext4/inode.c:4322
- c110aaa6 <-> c110aaa6
- /linux-3.13.5/fs/ext4/inode.c:4322
- 4312 } else {
- 4313 raw_inode->i_uid_high = 0;
- 4314 raw_inode->i_gid_high = 0;
- 4315 }
- 4316 } else {
- 4317 raw_inode->i_uid_low = cpu_to_le16(fs_high2lowuid(i_uid));
- 4318 raw_inode->i_gid_low = cpu_to_le16(fs_high2lowgid(i_gid));
- 4319 raw_inode->i_uid_high = 0;
- 4320 raw_inode->i_gid_high = 0;
- 4321 }
- ==> 4322 raw_inode->i_links_count = cpu_to_le16(inode->i_nlink);
- 4323
- 4324 EXT4_INODE_SET_XTIME(i_ctime, inode, raw_inode);
- 4325 EXT4_INODE_SET_XTIME(i_mtime, inode, raw_inode);
- 4326 EXT4_INODE_SET_XTIME(i_atime, inode, raw_inode);
- 4327 EXT4_EINODE_SET_XTIME(i_crtime, ei, raw_inode);
- 4328
- 4329 if (ext4_inode_blocks_set(handle, raw_inode, ei))
- 4330 goto out_brelse;
- 4331 raw_inode->i_dtime = cpu_to_le32(ei->i_dtime);
- 4332 raw_inode->i_flags = cpu_to_le32(ei->i_flags & 0xFFFFFFFF);
- ====================================================================================================================================================================================
- Variable: raw_inode->i_mode Addresses: c110aa52 c110aa3a c110abc9
- c110aa3a ext4_do_update_inode /linux-3.13.5/fs/ext4/inode.c:4297
- c110aa52 ext4_do_update_inode /linux-3.13.5/fs/ext4/inode.c:4301
- c110abc9 ext4_isize /linux-3.13.5/fs/ext4/ext4.h:2386
- c110aa3a <-> c110abc9
- c110aa52 <-> c110abc9
- c110aa52 <-> c110abc9
- /linux-3.13.5/fs/ext4/inode.c:4297
- 4287 int need_datasync = 0;
- 4288 uid_t i_uid;
- 4289 gid_t i_gid;
- 4290
- 4291 /* For fields not not tracking in the in-memory inode,
- 4292 * initialise them to zero for new inodes. */
- 4293 if (ext4_test_inode_state(inode, EXT4_STATE_NEW))
- 4294 memset(raw_inode, 0, EXT4_SB(inode->i_sb)->s_inode_size);
- 4295
- 4296 ext4_get_inode_flags(ei);
- ==> 4297 raw_inode->i_mode = cpu_to_le16(inode->i_mode);
- 4298 i_uid = i_uid_read(inode);
- 4299 i_gid = i_gid_read(inode);
- 4300 if (!(test_opt(inode->i_sb, NO_UID32))) {
- 4301 raw_inode->i_uid_low = cpu_to_le16(low_16_bits(i_uid));
- 4302 raw_inode->i_gid_low = cpu_to_le16(low_16_bits(i_gid));
- 4303 /*
- 4304 * Fix up interoperability with old kernels. Otherwise, old inodes get
- 4305 * re-used with the upper 16 bits of the uid/gid intact
- 4306 */
- 4307 if (!ei->i_dtime) {
- /linux-3.13.5/fs/ext4/inode.c:4301
- 4291 /* For fields not not tracking in the in-memory inode,
- 4292 * initialise them to zero for new inodes. */
- 4293 if (ext4_test_inode_state(inode, EXT4_STATE_NEW))
- 4294 memset(raw_inode, 0, EXT4_SB(inode->i_sb)->s_inode_size);
- 4295
- 4296 ext4_get_inode_flags(ei);
- 4297 raw_inode->i_mode = cpu_to_le16(inode->i_mode);
- 4298 i_uid = i_uid_read(inode);
- 4299 i_gid = i_gid_read(inode);
- 4300 if (!(test_opt(inode->i_sb, NO_UID32))) {
- ==> 4301 raw_inode->i_uid_low = cpu_to_le16(low_16_bits(i_uid));
- 4302 raw_inode->i_gid_low = cpu_to_le16(low_16_bits(i_gid));
- 4303 /*
- 4304 * Fix up interoperability with old kernels. Otherwise, old inodes get
- 4305 * re-used with the upper 16 bits of the uid/gid intact
- 4306 */
- 4307 if (!ei->i_dtime) {
- 4308 raw_inode->i_uid_high =
- 4309 cpu_to_le16(high_16_bits(i_uid));
- 4310 raw_inode->i_gid_high =
- 4311 cpu_to_le16(high_16_bits(i_gid));
- /linux-3.13.5/fs/ext4/ext4.h:2386
- 2376
- 2377 static inline void ext4_r_blocks_count_set(struct ext4_super_block *es,
- 2378 ext4_fsblk_t blk)
- 2379 {
- 2380 es->s_r_blocks_count_lo = cpu_to_le32((u32)blk);
- 2381 es->s_r_blocks_count_hi = cpu_to_le32(blk >> 32);
- 2382 }
- 2383
- 2384 static inline loff_t ext4_isize(struct ext4_inode *raw_inode)
- 2385 {
- ==> 2386 if (S_ISREG(le16_to_cpu(raw_inode->i_mode)))
- 2387 return ((loff_t)le32_to_cpu(raw_inode->i_size_high) << 32) |
- 2388 le32_to_cpu(raw_inode->i_size_lo);
- 2389 else
- 2390 return (loff_t) le32_to_cpu(raw_inode->i_size_lo);
- 2391 }
- 2392
- 2393 static inline void ext4_isize_set(struct ext4_inode *raw_inode, loff_t i_size)
- 2394 {
- 2395 raw_inode->i_size_lo = cpu_to_le32(i_size);
- 2396 raw_inode->i_size_high = cpu_to_le32(i_size >> 32);
- ====================================================================================================================================================================================
- Variable: EXT4_I(inode)->i_disksize Addresses: c110c810 c110c147 c110abcb c110c7d2
- c110c810 ext4_wb_update_i_disksize /linux-3.13.5/fs/ext4/ext4.h:2476
- c110abcb ext4_do_update_inode /linux-3.13.5/fs/ext4/inode.c:4338
- c110c7d2 mpage_map_and_submit_extent /linux-3.13.5/fs/ext4/inode.c:2236
- c110c147 ext4_da_write_end /linux-3.13.5/fs/ext4/inode.c:2758
- c110c810 <-> c110abcb
- c110c147 <-> c110abcb
- c110c147 <-> c110c7d2
- c110c147 <-> c110c7d2
- /linux-3.13.5/fs/ext4/ext4.h:2476
- 2466 */
- 2467 static inline void ext4_wb_update_i_disksize(struct inode *inode, loff_t newsize)
- 2468 {
- 2469 loff_t i_size;
- 2470
- 2471 down_write(&EXT4_I(inode)->i_data_sem);
- 2472 i_size = i_size_read(inode);
- 2473 if (newsize > i_size)
- 2474 newsize = i_size;
- 2475 if (newsize > EXT4_I(inode)->i_disksize)
- ==> 2476 EXT4_I(inode)->i_disksize = newsize;
- 2477 up_write(&EXT4_I(inode)->i_data_sem);
- 2478 }
- 2479
- 2480 struct ext4_group_info {
- 2481 unsigned long bb_state;
- 2482 struct rb_root bb_free_root;
- 2483 ext4_grpblk_t bb_first_free; /* first free block */
- 2484 ext4_grpblk_t bb_free; /* total free blocks */
- 2485 ext4_grpblk_t bb_fragments; /* nr of freespace fragments */
- 2486 ext4_grpblk_t bb_largest_free_order;/* order of largest frag in BG */
- /linux-3.13.5/fs/ext4/inode.c:4338
- 4328
- 4329 if (ext4_inode_blocks_set(handle, raw_inode, ei))
- 4330 goto out_brelse;
- 4331 raw_inode->i_dtime = cpu_to_le32(ei->i_dtime);
- 4332 raw_inode->i_flags = cpu_to_le32(ei->i_flags & 0xFFFFFFFF);
- 4333 if (EXT4_SB(inode->i_sb)->s_es->s_creator_os !=
- 4334 cpu_to_le32(EXT4_OS_HURD))
- 4335 raw_inode->i_file_acl_high =
- 4336 cpu_to_le16(ei->i_file_acl >> 32);
- 4337 raw_inode->i_file_acl_lo = cpu_to_le32(ei->i_file_acl);
- ==> 4338 if (ei->i_disksize != ext4_isize(raw_inode)) {
- 4339 ext4_isize_set(raw_inode, ei->i_disksize);
- 4340 need_datasync = 1;
- 4341 }
- 4342 if (ei->i_disksize > 0x7fffffffULL) {
- 4343 struct super_block *sb = inode->i_sb;
- 4344 if (!EXT4_HAS_RO_COMPAT_FEATURE(sb,
- 4345 EXT4_FEATURE_RO_COMPAT_LARGE_FILE) ||
- 4346 EXT4_SB(sb)->s_es->s_rev_level ==
- 4347 cpu_to_le32(EXT4_GOOD_OLD_REV)) {
- 4348 /* If this is the first large file
- /linux-3.13.5/fs/ext4/inode.c:2236
- 2226 * Update buffer state, submit mapped pages, and get us new
- 2227 * extent to map
- 2228 */
- 2229 err = mpage_map_and_submit_buffers(mpd);
- 2230 if (err < 0)
- 2231 return err;
- 2232 } while (map->m_len);
- 2233
- 2234 /* Update on-disk size after IO is submitted */
- 2235 disksize = ((loff_t)mpd->first_page) << PAGE_CACHE_SHIFT;
- ==> 2236 if (disksize > EXT4_I(inode)->i_disksize) {
- 2237 int err2;
- 2238
- 2239 ext4_wb_update_i_disksize(inode, disksize);
- 2240 err2 = ext4_mark_inode_dirty(handle, inode);
- 2241 if (err2)
- 2242 ext4_error(inode->i_sb,
- 2243 "Failed to mark inode %lu dirty",
- 2244 inode->i_ino);
- 2245 if (!err)
- 2246 err = err2;
- /linux-3.13.5/fs/ext4/inode.c:2758
- 2748 * generic_write_end() will run mark_inode_dirty() if i_size
- 2749 * changes. So let's piggyback the i_disksize mark_inode_dirty
- 2750 * into that.
- 2751 */
- 2752 new_i_size = pos + copied;
- 2753 if (copied && new_i_size > EXT4_I(inode)->i_disksize) {
- 2754 if (ext4_has_inline_data(inode) ||
- 2755 ext4_da_should_update_i_disksize(page, end)) {
- 2756 down_write(&EXT4_I(inode)->i_data_sem);
- 2757 if (new_i_size > EXT4_I(inode)->i_disksize)
- ==> 2758 EXT4_I(inode)->i_disksize = new_i_size;
- 2759 up_write(&EXT4_I(inode)->i_data_sem);
- 2760 /* We need to mark inode dirty even if
- 2761 * new_i_size is less that inode->i_size
- 2762 * bu greater than i_disksize.(hint delalloc)
- 2763 */
- 2764 ext4_mark_inode_dirty(handle, inode);
- 2765 }
- 2766 }
- 2767
- 2768 if (write_mode != CONVERT_INLINE_DATA &&
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement