mark_buffer_dirty

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Does anyone know if in general mark_buffer_dirty is called before the data is copied to the actual buffer or after? It feels like both of those are possible:
1) If we copied first and dirtied after then the data could be discarded when the block has to be thrown out without being written to its backing device.
2) On the other hand, if we set it dirty first and copy later then there is a chance that things are flushed to the device before the dirty bit is even set that the actual new data is discarded later on.


It seems like option 1 is what is happening most of the time, but I'm not entirely sure. I am working on a research project where we are tracking dirty buffers and I am trying to figure out if I can just copy the data from the buffer when it is dirtied or whether that will have to be done afterwards.
Thank you very much for any advice you can give me,
Can Sar



-- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux