lkml.org 
[lkml]   [2002]   [Jun]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subjectdirty buffers and umount/remount
Date
Hi all:

I have a question that should be simple to answer.

When building a system I need to make sure that whenever user
wants to save configuration to nonvolatile storage (i.e., disk),
all dirty buffers are flushed to disk. Basically I do the following:

1) mount filesystem X from read-only to read-write.
2) save all configuration files to a directory A on X.
3) do a sync.
4) write a label file in A saying "this marks a successful save of
all the configuration files".
5) remount X as read-only.

The problem is that 3) takes quite long time to finish (even most files
in 2) are opened with O_SYNC).

I am wondering if 3) is necessary or not. When the filesystem is remounted
from rw to ro, are all dirty buffers related to it flushed to disk? How
about
umount?

The last related question: is the kdev field in the buffer head the physical
block device (i.e., /dev/hda) or the logical block device (i.e., /dev/hda7)?

Thanks a lot.

Hua

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:22    [W:0.081 / U:1.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site