buffer_insert_list should use list_add_tail
PATCH 1/1 buffer_insert_list should use list_add_tail
Hello all,
buffer_insert_list puts buffers onto the head of bh->b_inode_buffers, which means that on fsync we are writing things out in reverse order. I think we either want this patch, or we want to walk the list in reverse in fsync_buffers_list
(this has not been well tested, but I can't think of any problems it would cause)
-chris
fs/buffer.c +1 -1
@@ -591,7 +604,7 @@if (buffer_attached (bh))list_del (&bh->b_inode_buffers);set_buffer_attached (bh); -list_add (&bh->b_inode_buffers, list); +list_add_tail (&bh->b_inode_buffers, list);spin_unlock (&lru_list_lock); }
Quoted 8 lines · Chris Mason
Hello all,
buffer_insert_listputs buffers onto the head ofbh->b_inode_buffers, which means that on fsync we are writing things out in reverse order. I think we either want this patch, or we want to walk the list in reverse infsync_buffers_list(this has not been well tested, but I can't think of any problems it
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Quoted 1 line
would cause)
hi Chris,
We noticed this too and Christoph made this change in the 2.4 XFS tree a little while ago - let me check dates - ah, 9th May. So, fair bit of testing here and we've not seen any issues from this change either (we'd also like to see it merged).
thanks.
Quoted 22 lines
(quoted diff) +0
-1-chrisfs/buffer.c +1
-2@@ -591,7 +604,7 @@if (buffer_attached (bh))list_del (&bh->b_inode_buffers);set_buffer_attached (bh); -list_add (&bh->b_inode_buffers, list); +list_add_tail (&bh->b_inode_buffers, list);spin_unlock (&lru_list_lock); } -To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Signature · 1 line
Nathan
Quoted 7 lines · Nathan Scott
hi Chris,
We noticed this too and Christoph made this change in the 2.4 XFS tree a little while ago - let me check dates - ah, 9th May. So, fair bit of testing here and we've not seen any issues from this change either (we'd also like to see it merged).
It's already in 2.5 for a long time and -ac since the XFS merge, too/