@@ -5445,7 +5445,7 @@ WritebackContextInit(WritebackContext *context, int *max_pending)
5445
5445
* Add buffer to list of pending writeback requests.
5446
5446
*/
5447
5447
void
5448
- ScheduleBufferTagForWriteback (WritebackContext * context , BufferTag * tag )
5448
+ ScheduleBufferTagForWriteback (WritebackContext * wb_context , BufferTag * tag )
5449
5449
{
5450
5450
PendingWriteback * pending ;
5451
5451
@@ -5456,11 +5456,11 @@ ScheduleBufferTagForWriteback(WritebackContext *context, BufferTag *tag)
5456
5456
* Add buffer to the pending writeback array, unless writeback control is
5457
5457
* disabled.
5458
5458
*/
5459
- if (* context -> max_pending > 0 )
5459
+ if (* wb_context -> max_pending > 0 )
5460
5460
{
5461
- Assert (* context -> max_pending <= WRITEBACK_MAX_PENDING_FLUSHES );
5461
+ Assert (* wb_context -> max_pending <= WRITEBACK_MAX_PENDING_FLUSHES );
5462
5462
5463
- pending = & context -> pending_writebacks [context -> nr_pending ++ ];
5463
+ pending = & wb_context -> pending_writebacks [wb_context -> nr_pending ++ ];
5464
5464
5465
5465
pending -> tag = * tag ;
5466
5466
}
@@ -5470,8 +5470,8 @@ ScheduleBufferTagForWriteback(WritebackContext *context, BufferTag *tag)
5470
5470
* includes the case where previously an item has been added, but control
5471
5471
* is now disabled.
5472
5472
*/
5473
- if (context -> nr_pending >= * context -> max_pending )
5474
- IssuePendingWritebacks (context );
5473
+ if (wb_context -> nr_pending >= * wb_context -> max_pending )
5474
+ IssuePendingWritebacks (wb_context );
5475
5475
}
5476
5476
5477
5477
#define ST_SORT sort_pending_writebacks
@@ -5489,25 +5489,26 @@ ScheduleBufferTagForWriteback(WritebackContext *context, BufferTag *tag)
5489
5489
* error out - it's just a hint.
5490
5490
*/
5491
5491
void
5492
- IssuePendingWritebacks (WritebackContext * context )
5492
+ IssuePendingWritebacks (WritebackContext * wb_context )
5493
5493
{
5494
5494
int i ;
5495
5495
5496
- if (context -> nr_pending == 0 )
5496
+ if (wb_context -> nr_pending == 0 )
5497
5497
return ;
5498
5498
5499
5499
/*
5500
5500
* Executing the writes in-order can make them a lot faster, and allows to
5501
5501
* merge writeback requests to consecutive blocks into larger writebacks.
5502
5502
*/
5503
- sort_pending_writebacks (context -> pending_writebacks , context -> nr_pending );
5503
+ sort_pending_writebacks (wb_context -> pending_writebacks ,
5504
+ wb_context -> nr_pending );
5504
5505
5505
5506
/*
5506
5507
* Coalesce neighbouring writes, but nothing else. For that we iterate
5507
5508
* through the, now sorted, array of pending flushes, and look forward to
5508
5509
* find all neighbouring (or identical) writes.
5509
5510
*/
5510
- for (i = 0 ; i < context -> nr_pending ; i ++ )
5511
+ for (i = 0 ; i < wb_context -> nr_pending ; i ++ )
5511
5512
{
5512
5513
PendingWriteback * cur ;
5513
5514
PendingWriteback * next ;
@@ -5517,18 +5518,18 @@ IssuePendingWritebacks(WritebackContext *context)
5517
5518
RelFileLocator currlocator ;
5518
5519
Size nblocks = 1 ;
5519
5520
5520
- cur = & context -> pending_writebacks [i ];
5521
+ cur = & wb_context -> pending_writebacks [i ];
5521
5522
tag = cur -> tag ;
5522
5523
currlocator = BufTagGetRelFileLocator (& tag );
5523
5524
5524
5525
/*
5525
5526
* Peek ahead, into following writeback requests, to see if they can
5526
5527
* be combined with the current one.
5527
5528
*/
5528
- for (ahead = 0 ; i + ahead + 1 < context -> nr_pending ; ahead ++ )
5529
+ for (ahead = 0 ; i + ahead + 1 < wb_context -> nr_pending ; ahead ++ )
5529
5530
{
5530
5531
5531
- next = & context -> pending_writebacks [i + ahead + 1 ];
5532
+ next = & wb_context -> pending_writebacks [i + ahead + 1 ];
5532
5533
5533
5534
/* different file, stop */
5534
5535
if (!RelFileLocatorEquals (currlocator ,
@@ -5555,7 +5556,7 @@ IssuePendingWritebacks(WritebackContext *context)
5555
5556
smgrwriteback (reln , BufTagGetForkNum (& tag ), tag .blockNum , nblocks );
5556
5557
}
5557
5558
5558
- context -> nr_pending = 0 ;
5559
+ wb_context -> nr_pending = 0 ;
5559
5560
}
5560
5561
5561
5562
0 commit comments