> I'm sorry I should have been more precise. In my case the
> files are more than a couple of days old and they are not the
> last modified on the system,

That's dtill not precise. What does "more than a couple of days
old" mean? And what does "last modified" mean?

My impression is that some of the analysis here is based on a
mistaken impression of how things are supposed to work or work
(at the Linux level, never mind storage).

> is this still the desired behaviour?

If the file was never 'fsync'ed it may still be in-memory, even
if 'close'd, as 'man 2 close' states:

 «A successful close does not guarantee that the data has been
  successfully saved to disk, as the kernel defers writes. It is
  not common for a file system to flush the buffers when the
  stream is closed. If you need to be sure that the data is
  physically stored use fsync(2). (It will depend on the disk
  hardware at this point.)»

However, I seem to remember that when I asked in this list how
often JFS log entries were flushed to the journal the answer was
every few seconds.

  Terminology note: in the JFS code usually 'log' refers to
  in-memory transaction records, while 'journal' refers to the
  on-disk ones.

But that's for metadata only. Data IIRC is flushed strictly only
on 'fsync' (or when there is memory pressure of course).

BTW there was some years ago a relatively small bug as to log
flushing order:

  http://www.mail-archive.com/[email protected]/msg32017.html

> [ ... ] where can I find information on what exactly the order
> and timing of log records disk writes depend on?

The JFS source code is relatively small. Probably you can look
at where 'jfs_lazycommit', 'jfs_flush_journal', 'jfs_sync' and
'lmLogSync', (in 'jfs_logmgr.c' mostly).

> [ ... ] Regarding the fsync approach, would it be possible to
> do this system wide or does it have to be the process holding
> the filedescriptor to that particular file?

A file can be opened via many many filedescriptors. What is
unique to each filedescriptor is the current position in the
file rather than the "dirty" pages in it.

> I'm thinking something like a separate process with a timer
> that issues a fsync every 10 min or so?

That should work...


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Jfs-discussion mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jfs-discussion

Reply via email to