aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-08-07 16:03:53 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-08-07 16:03:53 -0400
commit09dc942c2a767e2d298f1cc9294bc19c7d7208c5 (patch)
treed310c118467c90c264e953bdc320ae08394c662a /include
parent90e0c225968f0878e090c7ff3f88323973476cee (diff)
parent6c7a120ac6c62316ab1fc78dfc0a7b13f3bfcbff (diff)
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (40 commits) ext4: Adding error check after calling ext4_mb_regular_allocator() ext4: Fix dirtying of journalled buffers in data=journal mode ext4: re-inline ext4_rec_len_(to|from)_disk functions jbd2: Remove t_handle_lock from start_this_handle() jbd2: Change j_state_lock to be a rwlock_t jbd2: Use atomic variables to avoid taking t_handle_lock in jbd2_journal_stop ext4: Add mount options in superblock ext4: force block allocation on quota_off ext4: fix freeze deadlock under IO ext4: drop inode from orphan list if ext4_delete_inode() fails ext4: check to make make sure bd_dev is set before dereferencing it jbd2: Make barrier messages less scary ext4: don't print scary messages for allocation failures post-abort ext4: fix EFBIG edge case when writing to large non-extent file ext4: fix ext4_get_blocks references ext4: Always journal quota file modifications ext4: Fix potential memory leak in ext4_fill_super ext4: Don't error out the fs if the user tries to make a file too big ext4: allocate stripe-multiple IOs on stripe boundaries ext4: move aio completion after unwritten extent conversion ... Fix up conflicts in fs/ext4/inode.c as per Ted. Fix up xfs conflicts as per earlier xfs merge.
Diffstat (limited to 'include')
-rw-r--r--include/linux/jbd2.h16
-rw-r--r--include/trace/events/ext4.h20
2 files changed, 21 insertions, 15 deletions
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h
index adf832dec3f3..0b52924a0cb6 100644
--- a/include/linux/jbd2.h
+++ b/include/linux/jbd2.h
@@ -601,13 +601,13 @@ struct transaction_s
601 * Number of outstanding updates running on this transaction 601 * Number of outstanding updates running on this transaction
602 * [t_handle_lock] 602 * [t_handle_lock]
603 */ 603 */
604 int t_updates; 604 atomic_t t_updates;
605 605
606 /* 606 /*
607 * Number of buffers reserved for use by all handles in this transaction 607 * Number of buffers reserved for use by all handles in this transaction
608 * handle but not yet modified. [t_handle_lock] 608 * handle but not yet modified. [t_handle_lock]
609 */ 609 */
610 int t_outstanding_credits; 610 atomic_t t_outstanding_credits;
611 611
612 /* 612 /*
613 * Forward and backward links for the circular list of all transactions 613 * Forward and backward links for the circular list of all transactions
@@ -629,7 +629,7 @@ struct transaction_s
629 /* 629 /*
630 * How many handles used this transaction? [t_handle_lock] 630 * How many handles used this transaction? [t_handle_lock]
631 */ 631 */
632 int t_handle_count; 632 atomic_t t_handle_count;
633 633
634 /* 634 /*
635 * This transaction is being forced and some process is 635 * This transaction is being forced and some process is
@@ -764,7 +764,7 @@ struct journal_s
764 /* 764 /*
765 * Protect the various scalars in the journal 765 * Protect the various scalars in the journal
766 */ 766 */
767 spinlock_t j_state_lock; 767 rwlock_t j_state_lock;
768 768
769 /* 769 /*
770 * Number of processes waiting to create a barrier lock [j_state_lock] 770 * Number of processes waiting to create a barrier lock [j_state_lock]
@@ -1082,7 +1082,9 @@ static inline handle_t *journal_current_handle(void)
1082 */ 1082 */
1083 1083
1084extern handle_t *jbd2_journal_start(journal_t *, int nblocks); 1084extern handle_t *jbd2_journal_start(journal_t *, int nblocks);
1085extern int jbd2_journal_restart (handle_t *, int nblocks); 1085extern handle_t *jbd2__journal_start(journal_t *, int nblocks, int gfp_mask);
1086extern int jbd2_journal_restart(handle_t *, int nblocks);
1087extern int jbd2__journal_restart(handle_t *, int nblocks, int gfp_mask);
1086extern int jbd2_journal_extend (handle_t *, int nblocks); 1088extern int jbd2_journal_extend (handle_t *, int nblocks);
1087extern int jbd2_journal_get_write_access(handle_t *, struct buffer_head *); 1089extern int jbd2_journal_get_write_access(handle_t *, struct buffer_head *);
1088extern int jbd2_journal_get_create_access (handle_t *, struct buffer_head *); 1090extern int jbd2_journal_get_create_access (handle_t *, struct buffer_head *);
@@ -1257,8 +1259,8 @@ static inline int jbd_space_needed(journal_t *journal)
1257{ 1259{
1258 int nblocks = journal->j_max_transaction_buffers; 1260 int nblocks = journal->j_max_transaction_buffers;
1259 if (journal->j_committing_transaction) 1261 if (journal->j_committing_transaction)
1260 nblocks += journal->j_committing_transaction-> 1262 nblocks += atomic_read(&journal->j_committing_transaction->
1261 t_outstanding_credits; 1263 t_outstanding_credits);
1262 return nblocks; 1264 return nblocks;
1263} 1265}
1264 1266
diff --git a/include/trace/events/ext4.h b/include/trace/events/ext4.h
index f3865c7b4166..01e9e0076a92 100644
--- a/include/trace/events/ext4.h
+++ b/include/trace/events/ext4.h
@@ -395,11 +395,12 @@ DEFINE_EVENT(ext4__mb_new_pa, ext4_mb_new_group_pa,
395); 395);
396 396
397TRACE_EVENT(ext4_mb_release_inode_pa, 397TRACE_EVENT(ext4_mb_release_inode_pa,
398 TP_PROTO(struct ext4_allocation_context *ac, 398 TP_PROTO(struct super_block *sb,
399 struct ext4_allocation_context *ac,
399 struct ext4_prealloc_space *pa, 400 struct ext4_prealloc_space *pa,
400 unsigned long long block, unsigned int count), 401 unsigned long long block, unsigned int count),
401 402
402 TP_ARGS(ac, pa, block, count), 403 TP_ARGS(sb, ac, pa, block, count),
403 404
404 TP_STRUCT__entry( 405 TP_STRUCT__entry(
405 __field( dev_t, dev ) 406 __field( dev_t, dev )
@@ -410,8 +411,9 @@ TRACE_EVENT(ext4_mb_release_inode_pa,
410 ), 411 ),
411 412
412 TP_fast_assign( 413 TP_fast_assign(
413 __entry->dev = ac->ac_sb->s_dev; 414 __entry->dev = sb->s_dev;
414 __entry->ino = ac->ac_inode->i_ino; 415 __entry->ino = (ac && ac->ac_inode) ?
416 ac->ac_inode->i_ino : 0;
415 __entry->block = block; 417 __entry->block = block;
416 __entry->count = count; 418 __entry->count = count;
417 ), 419 ),
@@ -422,10 +424,11 @@ TRACE_EVENT(ext4_mb_release_inode_pa,
422); 424);
423 425
424TRACE_EVENT(ext4_mb_release_group_pa, 426TRACE_EVENT(ext4_mb_release_group_pa,
425 TP_PROTO(struct ext4_allocation_context *ac, 427 TP_PROTO(struct super_block *sb,
428 struct ext4_allocation_context *ac,
426 struct ext4_prealloc_space *pa), 429 struct ext4_prealloc_space *pa),
427 430
428 TP_ARGS(ac, pa), 431 TP_ARGS(sb, ac, pa),
429 432
430 TP_STRUCT__entry( 433 TP_STRUCT__entry(
431 __field( dev_t, dev ) 434 __field( dev_t, dev )
@@ -436,8 +439,9 @@ TRACE_EVENT(ext4_mb_release_group_pa,
436 ), 439 ),
437 440
438 TP_fast_assign( 441 TP_fast_assign(
439 __entry->dev = ac->ac_sb->s_dev; 442 __entry->dev = sb->s_dev;
440 __entry->ino = ac->ac_inode->i_ino; 443 __entry->ino = (ac && ac->ac_inode) ?
444 ac->ac_inode->i_ino : 0;
441 __entry->pa_pstart = pa->pa_pstart; 445 __entry->pa_pstart = pa->pa_pstart;
442 __entry->pa_len = pa->pa_len; 446 __entry->pa_len = pa->pa_len;
443 ), 447 ),