[RTEMS Project] #1486: Reset of all hold timers when sync_active in rtems_bdbuf_swapout_modified_processing() might be not correct

RTEMS trac trac at rtems.org
Sat Nov 22 13:48:28 UTC 2014


#1486: Reset of all hold timers when sync_active in
rtems_bdbuf_swapout_modified_processing() might be not correct
---------------------------+----------------------------
 Reporter:  Oleg.Kravtsov  |       Owner:  joel.sherrill
     Type:  defect         |      Status:  new
 Priority:  normal         |   Milestone:  4.10.3
Component:  filesystem     |     Version:  4.10
 Severity:  normal         |  Resolution:
 Keywords:                 |
---------------------------+----------------------------
Changes (by gedare):

 * milestone:  4.10 => 4.10.3


Old description:

> In rtems_bdbuf_swapout_modified_processing() function there are following
> lines:
> if (sync_active)
>   bd->hold_timer = 0;
>
> I.e. in case of calling rtems_bdbuf_sync() for a PARTICULAR device DEV1,
> we will reset hold timer of ALL modified buffers, which is not a desired
> behaviour.
>
> If we have a look at next lines of this function we will see that
> "transfer" list is populated with a buffer entry only when:
> "if (bd->dev == *dev)"
> condition is true.
>
> This means that on the next swapout timeout all previously reset buffers
> will be written to a disk.
>
> Now imagine that we have VERY slow block device for whose we configured
> VERY BIG swap hold timer value in order to do disk sync rarely, and we do
> sync on another disk device. This sync will cause sync on ALL devices.
>
> What do you think about it?

New description:

 In rtems_bdbuf_swapout_modified_processing() function there are following
 lines:
 if (sync_active)
   bd->hold_timer = 0;
 I.e. in case of calling rtems_bdbuf_sync() for a PARTICULAR device DEV1,
 we will reset hold timer of ALL modified buffers, which is not a desired
 behaviour.
 If we have a look at next lines of this function we will see that
 "transfer" list is populated with a buffer entry only when:
 "if (bd->dev == *dev)"
 condition is true.
 This means that on the next swapout timeout all previously reset buffers
 will be written to a disk.
 Now imagine that we have VERY slow block device for whose we configured
 VERY BIG swap hold timer value in order to do disk sync rarely, and we do
 sync on another disk device. This sync will cause sync on ALL devices.
 What do you think about it?

--

--
Ticket URL: <http://devel.rtems.org/ticket/1486#comment:3>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list