Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ====================================================================================================================================================================================
- Variable: mapping->nrpages Addresses: c107d9f3 c110c8d7
- c107d9f3 add_to_page_cache_locked /linux-3.13.5/mm/filemap.c:487
- c110c8d7 ext4_writepages /linux-3.13.5/fs/ext4/inode.c:2413
- c110c8d7 <-> c107d9f3
- c110c8d7 <-> c107d9f3
- /linux-3.13.5/mm/filemap.c:487
- 477
- 478 page_cache_get(page);
- 479 page->mapping = mapping;
- 480 page->index = offset;
- 481
- 482 spin_lock_irq(&mapping->tree_lock);
- 483 error = radix_tree_insert(&mapping->page_tree, offset, page);
- 484 radix_tree_preload_end();
- 485 if (unlikely(error))
- 486 goto err_insert;
- ==> 487 mapping->nrpages++;
- 488 __inc_zone_page_state(page, NR_FILE_PAGES);
- 489 spin_unlock_irq(&mapping->tree_lock);
- 490 trace_mm_filemap_add_to_page_cache(page);
- 491 return 0;
- 492 err_insert:
- 493 page->mapping = NULL;
- 494 /* Leave page->index set: truncation relies upon it */
- 495 spin_unlock_irq(&mapping->tree_lock);
- 496 mem_cgroup_uncharge_cache_page(page);
- 497 page_cache_release(page);
- /linux-3.13.5/fs/ext4/inode.c:2413
- 2403 struct blk_plug plug;
- 2404 bool give_up_on_write = false;
- 2405
- 2406 trace_ext4_writepages(inode, wbc);
- 2407
- 2408 /*
- 2409 * No pages to write? This is mainly a kludge to avoid starting
- 2410 * a transaction for special inodes like journal inode on last iput()
- 2411 * because that could violate lock ordering on umount
- 2412 */
- ==> 2413 if (!mapping->nrpages || !mapping_tagged(mapping, PAGECACHE_TAG_DIRTY))
- 2414 goto out_writepages;
- 2415
- 2416 if (ext4_should_journal_data(inode)) {
- 2417 struct blk_plug plug;
- 2418
- 2419 blk_start_plug(&plug);
- 2420 ret = write_cache_pages(mapping, wbc, __writepage, mapping);
- 2421 blk_finish_plug(&plug);
- 2422 goto out_writepages;
- 2423 }
- ====================================================================================================================================================================================
- Variable: raw_inode->i_size_lo Addresses: c110abf0 c110abdb
- c110abf0 ext4_isize_set /linux-3.13.5/fs/ext4/ext4.h:2395
- c110abdb ext4_isize /linux-3.13.5/fs/ext4/ext4.h:2387
- c110abf0 <-> c110abdb
- c110abf0 <-> c110abdb
- /linux-3.13.5/fs/ext4/ext4.h:2395
- 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);
- 2397 }
- 2398
- 2399 static inline
- 2400 struct ext4_group_info *ext4_get_group_info(struct super_block *sb,
- 2401 ext4_group_t group)
- 2402 {
- 2403 struct ext4_group_info ***grp_info;
- 2404 long indexv, indexh;
- 2405 BUG_ON(group >= EXT4_SB(sb)->s_groups_count);
- /linux-3.13.5/fs/ext4/ext4.h:2387
- 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);
- 2397 }
- ====================================================================================================================================================================================
- Variable: mapping->writeback_index Addresses: c108320f
- c108320f write_cache_pages /linux-3.13.5/mm/page-writeback.c:2012
- c108320f <-> c108320f
- /linux-3.13.5/mm/page-writeback.c:2012
- 2002 * range_cyclic:
- 2003 * We hit the last page and there is more work to be done: wrap
- 2004 * back to the start of the file
- 2005 */
- 2006 cycled = 1;
- 2007 index = 0;
- 2008 end = writeback_index - 1;
- 2009 goto retry;
- 2010 }
- 2011 if (wbc->range_cyclic || (range_whole && wbc->nr_to_write > 0))
- ==> 2012 mapping->writeback_index = done_index;
- 2013
- 2014 return ret;
- 2015 }
- 2016 EXPORT_SYMBOL(write_cache_pages);
- 2017
- 2018 /*
- 2019 * Function used by generic_writepages to call the real writepage
- 2020 * function and set the mapping flags on error
- 2021 */
- 2022 static int __writepage(struct page *page, struct writeback_control *wbc,
- ====================================================================================================================================================================================
- Variable: ei->i_datasync_tid Addresses: c110adb3
- c110adb3 ext4_update_inode_fsync_trans /linux-3.13.5/fs/ext4/ext4_jbd2.h:384
- c110adb3 <-> c110adb3
- /linux-3.13.5/fs/ext4/ext4_jbd2.h:384
- 374
- 375 static inline void ext4_update_inode_fsync_trans(handle_t *handle,
- 376 struct inode *inode,
- 377 int datasync)
- 378 {
- 379 struct ext4_inode_info *ei = EXT4_I(inode);
- 380
- 381 if (ext4_handle_valid(handle)) {
- 382 ei->i_sync_tid = handle->h_transaction->t_tid;
- 383 if (datasync)
- ==> 384 ei->i_datasync_tid = handle->h_transaction->t_tid;
- 385 }
- 386 }
- 387
- 388 /* super.c */
- 389 int ext4_force_commit(struct super_block *sb);
- 390
- 391 /*
- 392 * Ext4 inode journal modes
- 393 */
- 394 #define EXT4_INODE_JOURNAL_DATA_MODE 0x01 /* journal data mode */
- ====================================================================================================================================================================================
- Variable: ei->i_sync_tid Addresses: c112ae80 c110ae6f
- c112ae80 ext4_update_inode_fsync_trans /linux-3.13.5/fs/ext4/ext4_jbd2.h:382
- c110ae6f ext4_update_inode_fsync_trans /linux-3.13.5/fs/ext4/ext4_jbd2.h:382
- c112ae80 <-> c110ae6f
- c110ae6f <-> c110ae6f
- /linux-3.13.5/fs/ext4/ext4_jbd2.h:382
- 372 return 0;
- 373 }
- 374
- 375 static inline void ext4_update_inode_fsync_trans(handle_t *handle,
- 376 struct inode *inode,
- 377 int datasync)
- 378 {
- 379 struct ext4_inode_info *ei = EXT4_I(inode);
- 380
- 381 if (ext4_handle_valid(handle)) {
- ==> 382 ei->i_sync_tid = handle->h_transaction->t_tid;
- 383 if (datasync)
- 384 ei->i_datasync_tid = handle->h_transaction->t_tid;
- 385 }
- 386 }
- 387
- 388 /* super.c */
- 389 int ext4_force_commit(struct super_block *sb);
- 390
- 391 /*
- 392 * Ext4 inode journal modes
- /linux-3.13.5/fs/ext4/ext4_jbd2.h:382
- 372 return 0;
- 373 }
- 374
- 375 static inline void ext4_update_inode_fsync_trans(handle_t *handle,
- 376 struct inode *inode,
- 377 int datasync)
- 378 {
- 379 struct ext4_inode_info *ei = EXT4_I(inode);
- 380
- 381 if (ext4_handle_valid(handle)) {
- ==> 382 ei->i_sync_tid = handle->h_transaction->t_tid;
- 383 if (datasync)
- 384 ei->i_datasync_tid = handle->h_transaction->t_tid;
- 385 }
- 386 }
- 387
- 388 /* super.c */
- 389 int ext4_force_commit(struct super_block *sb);
- 390
- 391 /*
- 392 * Ext4 inode journal modes
- ====================================================================================================================================================================================
- Variable: kaddr/link Addresses: c10ade1a c12d40eb
- c10ade1a generic_readlinkat()->page_follow_link_light()->page_getlink()->nd_terminate_link /linux-3.13.5/include/linux/namei.h:98
- c12d40eb generic_readlinkat()->vfs_readlink()->strlen /linux-3.13.5/arch/x86/lib/string_32.c:168
- c10ade1a <-> c12d40eb
- c10ade1a <-> c12d40eb
- /linux-3.13.5/include/linux/namei.h:98
- 88 nd->saved_names[nd->depth] = path;
- 89 }
- 90
- 91 static inline char *nd_get_link(struct nameidata *nd)
- 92 {
- 93 return nd->saved_names[nd->depth];
- 94 }
- 95
- 96 static inline void nd_terminate_link(void *name, size_t len, size_t maxlen)
- 97 {
- ==> 98 ((char *) name)[min(len, maxlen)] = '\0';
- 99 }
- 100
- 101 /**
- 102 * retry_estale - determine whether the caller should retry an operation
- 103 * @error: the error that would currently be returned
- 104 * @flags: flags being used for next lookup attempt
- 105 *
- 106 * Check to see if the error code was -ESTALE, and then determine whether
- 107 * to retry the call based on whether "flags" already has LOOKUP_REVAL set.
- 108 *
- /linux-3.13.5/arch/x86/lib/string_32.c:168
- 158 return res;
- 159 }
- 160 EXPORT_SYMBOL(strchr);
- 161 #endif
- 162
- 163 #ifdef __HAVE_ARCH_STRLEN
- 164 size_t strlen(const char *s)
- 165 {
- 166 int d0;
- 167 size_t res;
- ==> 168 asm volatile("repne\n\t"
- 169 "scasb"
- 170 : "=c" (res), "=&D" (d0)
- 171 : "1" (s), "a" (0), "0" (0xffffffffu)
- 172 : "memory");
- 173 return ~res - 1;
- 174 }
- 175 EXPORT_SYMBOL(strlen);
- 176 #endif
- 177
- 178 #ifdef __HAVE_ARCH_MEMCHR
- ====================================================================================================================================================================================
- Variable: journal->j_running_transaction Addresses: c1138ca1 c1136b02 c1136ca9
- c1136ca9 jbd2_get_transaction /linux-3.13.5/fs/jbd2/transaction.c:103
- c1138ca1 jbd2_journal_commit_transaction /linux-3.13.5/fs/jbd2/commit.c:539
- c1136b02 start_this_handle /linux-3.13.5/fs/jbd2/transaction.c:280
- c1136ca9 <-> c1136b02
- c1138ca1 <-> c1136b02
- c1136ca9 <-> c1136b02
- /linux-3.13.5/fs/jbd2/transaction.c:103
- 93 atomic_read(&journal->j_reserved_credits));
- 94 atomic_set(&transaction->t_handle_count, 0);
- 95 INIT_LIST_HEAD(&transaction->t_inode_list);
- 96 INIT_LIST_HEAD(&transaction->t_private_list);
- 97
- 98 /* Set up the commit timer for the new transaction. */
- 99 journal->j_commit_timer.expires = round_jiffies_up(transaction->t_expires);
- 100 add_timer(&journal->j_commit_timer);
- 101
- 102 J_ASSERT(journal->j_running_transaction == NULL);
- ==> 103 journal->j_running_transaction = transaction;
- 104 transaction->t_max_wait = 0;
- 105 transaction->t_start = jiffies;
- 106 transaction->t_requested = 0;
- 107
- 108 return transaction;
- 109 }
- 110
- 111 /*
- 112 * Handle management.
- 113 *
- /linux-3.13.5/fs/jbd2/commit.c:539
- 529 atomic_sub(atomic_read(&journal->j_reserved_credits),
- 530 &commit_transaction->t_outstanding_credits);
- 531
- 532 trace_jbd2_commit_flushing(journal, commit_transaction);
- 533 stats.run.rs_flushing = jiffies;
- 534 stats.run.rs_locked = jbd2_time_diff(stats.run.rs_locked,
- 535 stats.run.rs_flushing);
- 536
- 537 commit_transaction->t_state = T_FLUSH;
- 538 journal->j_committing_transaction = commit_transaction;
- ==> 539 journal->j_running_transaction = NULL;
- 540 start_time = ktime_get();
- 541 commit_transaction->t_log_start = journal->j_head;
- 542 wake_up(&journal->j_wait_transaction_locked);
- 543 write_unlock(&journal->j_state_lock);
- 544
- 545 jbd_debug(3, "JBD2: commit phase 2a\n");
- 546
- 547 /*
- 548 * Now start flushing things to disk, in the order they appear
- 549 * on the transaction lists. Data blocks go first.
- /linux-3.13.5/fs/jbd2/transaction.c:280
- 270 printk(KERN_ERR "JBD2: %s wants too many credits (%d > %d)\n",
- 271 current->comm, blocks,
- 272 journal->j_max_transaction_buffers / 2);
- 273 return -ENOSPC;
- 274 }
- 275
- 276 if (handle->h_rsv_handle)
- 277 rsv_blocks = handle->h_rsv_handle->h_buffer_credits;
- 278
- 279 alloc_transaction:
- ==> 280 if (!journal->j_running_transaction) {
- 281 new_transaction = kmem_cache_zalloc(transaction_cache,
- 282 gfp_mask);
- 283 if (!new_transaction) {
- 284 /*
- 285 * If __GFP_FS is not present, then we may be
- 286 * being called from inside the fs writeback
- 287 * layer, so we MUST NOT fail. Since
- 288 * __GFP_NOFAIL is going away, we will arrange
- 289 * to retry the allocation ourselves.
- 290 */
- ====================================================================================================================================================================================
- Variable: inode->i_state Addresses: c10c035e c10c03cb c10c0352 c10c093a c10bffe2
- c10c0352 __writeback_single_inode /linux-3.13.5/fs/fs-writeback.c:473
- c10bffe2 inode_sync_complete /linux-3.13.5/fs/fs-writeback.c:217
- c10c035e __writeback_single_inode /linux-3.13.5/fs/fs-writeback.c:475
- c10c093a writeback_sb_inodes /linux-3.13.5/fs/fs-writeback.c:666
- c10c03cb __mark_inode_dirty /linux-3.13.5/fs/fs-writeback.c:1149
- c10c0352 <-> c10c03cb
- c10bffe2 <-> c10c03cb
- c10c03cb <-> c10c035e
- c10c093a <-> c10c03cb
- c10c03cb <-> c10c035e
- /linux-3.13.5/fs/fs-writeback.c:473
- 463 }
- 464
- 465 /*
- 466 * Some filesystems may redirty the inode during the writeback
- 467 * due to delalloc, clear dirty metadata flags right before
- 468 * write_inode()
- 469 */
- 470 spin_lock(&inode->i_lock);
- 471 /* Clear I_DIRTY_PAGES if we've written out all dirty pages */
- 472 if (!mapping_tagged(mapping, PAGECACHE_TAG_DIRTY))
- ==> 473 inode->i_state &= ~I_DIRTY_PAGES;
- 474 dirty = inode->i_state & I_DIRTY;
- 475 inode->i_state &= ~(I_DIRTY_SYNC | I_DIRTY_DATASYNC);
- 476 spin_unlock(&inode->i_lock);
- 477 /* Don't write the inode if only I_DIRTY_PAGES was set */
- 478 if (dirty & (I_DIRTY_SYNC | I_DIRTY_DATASYNC)) {
- 479 int err = write_inode(inode, wbc);
- 480 if (ret == 0)
- 481 ret = err;
- 482 }
- 483 trace_writeback_single_inode(inode, wbc, nr_to_write);
- /linux-3.13.5/fs/fs-writeback.c:217
- 207 * requeue inode for re-scanning after bdi->b_io list is exhausted.
- 208 */
- 209 static void requeue_io(struct inode *inode, struct bdi_writeback *wb)
- 210 {
- 211 assert_spin_locked(&wb->list_lock);
- 212 list_move(&inode->i_wb_list, &wb->b_more_io);
- 213 }
- 214
- 215 static void inode_sync_complete(struct inode *inode)
- 216 {
- ==> 217 inode->i_state &= ~I_SYNC;
- 218 /* If inode is clean an unused, put it into LRU now... */
- 219 inode_add_lru(inode);
- 220 /* Waiters must see I_SYNC cleared before being woken up */
- 221 smp_mb();
- 222 wake_up_bit(&inode->i_state, __I_SYNC);
- 223 }
- 224
- 225 static bool inode_dirtied_after(struct inode *inode, unsigned long t)
- 226 {
- 227 bool ret = time_after(inode->dirtied_when, t);
- /linux-3.13.5/fs/fs-writeback.c:475
- 465 /*
- 466 * Some filesystems may redirty the inode during the writeback
- 467 * due to delalloc, clear dirty metadata flags right before
- 468 * write_inode()
- 469 */
- 470 spin_lock(&inode->i_lock);
- 471 /* Clear I_DIRTY_PAGES if we've written out all dirty pages */
- 472 if (!mapping_tagged(mapping, PAGECACHE_TAG_DIRTY))
- 473 inode->i_state &= ~I_DIRTY_PAGES;
- 474 dirty = inode->i_state & I_DIRTY;
- ==> 475 inode->i_state &= ~(I_DIRTY_SYNC | I_DIRTY_DATASYNC);
- 476 spin_unlock(&inode->i_lock);
- 477 /* Don't write the inode if only I_DIRTY_PAGES was set */
- 478 if (dirty & (I_DIRTY_SYNC | I_DIRTY_DATASYNC)) {
- 479 int err = write_inode(inode, wbc);
- 480 if (ret == 0)
- 481 ret = err;
- 482 }
- 483 trace_writeback_single_inode(inode, wbc, nr_to_write);
- 484 return ret;
- 485 }
- /linux-3.13.5/fs/fs-writeback.c:666
- 656 * are doing WB_SYNC_NONE writeback. So this catches only the
- 657 * WB_SYNC_ALL case.
- 658 */
- 659 if (inode->i_state & I_SYNC) {
- 660 /* Wait for I_SYNC. This function drops i_lock... */
- 661 inode_sleep_on_writeback(inode);
- 662 /* Inode may be gone, start again */
- 663 spin_lock(&wb->list_lock);
- 664 continue;
- 665 }
- ==> 666 inode->i_state |= I_SYNC;
- 667 spin_unlock(&inode->i_lock);
- 668
- 669 write_chunk = writeback_chunk_size(wb->bdi, work);
- 670 wbc.nr_to_write = write_chunk;
- 671 wbc.pages_skipped = 0;
- 672
- 673 /*
- 674 * We use I_SYNC to pin the inode in memory. While it is set
- 675 * evict_inode() will wait so the inode cannot be freed.
- 676 */
- /linux-3.13.5/fs/fs-writeback.c:1149
- 1139 trace_writeback_dirty_inode(inode, flags);
- 1140 }
- 1141
- 1142 /*
- 1143 * make sure that changes are seen by all cpus before we test i_state
- 1144 * -- mikulas
- 1145 */
- 1146 smp_mb();
- 1147
- 1148 /* avoid the locking if we can */
- ==> 1149 if ((inode->i_state & flags) == flags)
- 1150 return;
- 1151
- 1152 if (unlikely(block_dump))
- 1153 block_dump___mark_inode_dirty(inode);
- 1154
- 1155 spin_lock(&inode->i_lock);
- 1156 if ((inode->i_state & flags) != flags) {
- 1157 const int was_dirty = inode->i_state & I_DIRTY;
- 1158
- 1159 inode->i_state |= flags;
- ====================================================================================================================================================================================
- Variable: raw_inode->i_size_high Addresses: c110abf3 c110abde
- c110abde ext4_isize /linux-3.13.5/fs/ext4/ext4.h:2387
- c110abf3 ext4_isize_set /linux-3.13.5/fs/ext4/ext4.h:2396
- c110abde <-> c110abf3
- c110abde <-> c110abf3
- /linux-3.13.5/fs/ext4/ext4.h:2387
- 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);
- 2397 }
- /linux-3.13.5/fs/ext4/ext4.h:2396
- 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);
- 2397 }
- 2398
- 2399 static inline
- 2400 struct ext4_group_info *ext4_get_group_info(struct super_block *sb,
- 2401 ext4_group_t group)
- 2402 {
- 2403 struct ext4_group_info ***grp_info;
- 2404 long indexv, indexh;
- 2405 BUG_ON(group >= EXT4_SB(sb)->s_groups_count);
- 2406 grp_info = EXT4_SB(sb)->s_group_info;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement