Commit c73e4ef2 authored by Nathan Scott's avatar Nathan Scott Committed by Christoph Hellwig

[XFS] Allow xfsbufd flush intervals to take immediate effect after changing...

[XFS] Allow xfsbufd flush intervals to take immediate effect after changing the flush sysctl value.  Fix from Bart Samwel.

SGI Modid: xfs-linux:xfs-kern:170053a
parent e415172f
......@@ -1535,7 +1535,7 @@ pagebuf_delwri_queue(
}
list_add_tail(&pb->pb_list, &pbd_delwrite_queue);
pb->pb_flushtime = jiffies + xfs_age_buffer;
pb->pb_queuetime = jiffies;
spin_unlock(&pbd_delwrite_lock);
if (unlock)
......@@ -1605,7 +1605,9 @@ pagebuf_daemon(
if (!pagebuf_ispin(pb) && !pagebuf_cond_lock(pb)) {
if (!force_flush &&
time_before(jiffies, pb->pb_flushtime)) {
time_before(jiffies,
pb->pb_queuetime +
xfs_age_buffer)) {
pagebuf_unlock(pb);
break;
}
......
......@@ -135,7 +135,7 @@ typedef int (*page_buf_bdstrat_t)(struct xfs_buf *);
typedef struct xfs_buf {
struct semaphore pb_sema; /* semaphore for lockables */
unsigned long pb_flushtime; /* time to flush pagebuf */
unsigned long pb_queuetime; /* time buffer was queued */
atomic_t pb_pin_count; /* pin count */
wait_queue_head_t pb_waiters; /* unpin waiters */
struct list_head pb_list;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment