aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ntfs
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ntfs')
-rw-r--r--fs/ntfs/ChangeLog3
-rw-r--r--fs/ntfs/aops.c15
2 files changed, 12 insertions, 6 deletions
diff --git a/fs/ntfs/ChangeLog b/fs/ntfs/ChangeLog
index 029f856c56c0..32a4150ebcb2 100644
--- a/fs/ntfs/ChangeLog
+++ b/fs/ntfs/ChangeLog
@@ -86,6 +86,9 @@ ToDo/Notes:
86 - Fix fs/ntfs/aops.c::ntfs_{read,write}_block() to handle the case 86 - Fix fs/ntfs/aops.c::ntfs_{read,write}_block() to handle the case
87 where a concurrent truncate has truncated the runlist under our feet. 87 where a concurrent truncate has truncated the runlist under our feet.
88 - Fix page_has_buffers()/page_buffers() handling in fs/ntfs/aops.c. 88 - Fix page_has_buffers()/page_buffers() handling in fs/ntfs/aops.c.
89 - In fs/ntfs/aops.c::ntfs_end_buffer_async_read(), use a bit spin lock
90 in the first buffer head instead of a driver global spin lock to
91 improve scalability.
89 92
902.1.23 - Implement extension of resident files and make writing safe as well as 932.1.23 - Implement extension of resident files and make writing safe as well as
91 many bug fixes, cleanups, and enhancements... 94 many bug fixes, cleanups, and enhancements...
diff --git a/fs/ntfs/aops.c b/fs/ntfs/aops.c
index 52e1aff98b00..950b686f02d3 100644
--- a/fs/ntfs/aops.c
+++ b/fs/ntfs/aops.c
@@ -55,9 +55,8 @@
55 */ 55 */
56static void ntfs_end_buffer_async_read(struct buffer_head *bh, int uptodate) 56static void ntfs_end_buffer_async_read(struct buffer_head *bh, int uptodate)
57{ 57{
58 static DEFINE_SPINLOCK(page_uptodate_lock);
59 unsigned long flags; 58 unsigned long flags;
60 struct buffer_head *tmp; 59 struct buffer_head *first, *tmp;
61 struct page *page; 60 struct page *page;
62 ntfs_inode *ni; 61 ntfs_inode *ni;
63 int page_uptodate = 1; 62 int page_uptodate = 1;
@@ -89,11 +88,13 @@ static void ntfs_end_buffer_async_read(struct buffer_head *bh, int uptodate)
89 } 88 }
90 } else { 89 } else {
91 clear_buffer_uptodate(bh); 90 clear_buffer_uptodate(bh);
91 SetPageError(page);
92 ntfs_error(ni->vol->sb, "Buffer I/O error, logical block %llu.", 92 ntfs_error(ni->vol->sb, "Buffer I/O error, logical block %llu.",
93 (unsigned long long)bh->b_blocknr); 93 (unsigned long long)bh->b_blocknr);
94 SetPageError(page);
95 } 94 }
96 spin_lock_irqsave(&page_uptodate_lock, flags); 95 first = page_buffers(page);
96 local_irq_save(flags);
97 bit_spin_lock(BH_Uptodate_Lock, &first->b_state);
97 clear_buffer_async_read(bh); 98 clear_buffer_async_read(bh);
98 unlock_buffer(bh); 99 unlock_buffer(bh);
99 tmp = bh; 100 tmp = bh;
@@ -108,7 +109,8 @@ static void ntfs_end_buffer_async_read(struct buffer_head *bh, int uptodate)
108 } 109 }
109 tmp = tmp->b_this_page; 110 tmp = tmp->b_this_page;
110 } while (tmp != bh); 111 } while (tmp != bh);
111 spin_unlock_irqrestore(&page_uptodate_lock, flags); 112 bit_spin_unlock(BH_Uptodate_Lock, &first->b_state);
113 local_irq_restore(flags);
112 /* 114 /*
113 * If none of the buffers had errors then we can set the page uptodate, 115 * If none of the buffers had errors then we can set the page uptodate,
114 * but we first have to perform the post read mst fixups, if the 116 * but we first have to perform the post read mst fixups, if the
@@ -141,7 +143,8 @@ static void ntfs_end_buffer_async_read(struct buffer_head *bh, int uptodate)
141 unlock_page(page); 143 unlock_page(page);
142 return; 144 return;
143still_busy: 145still_busy:
144 spin_unlock_irqrestore(&page_uptodate_lock, flags); 146 bit_spin_unlock(BH_Uptodate_Lock, &first->b_state);
147 local_irq_restore(flags);
145 return; 148 return;
146} 149}
147 150