Hello On Tuesday 27 March 2007 21:20, Lin Shen (lshen) wrote: > I saw 32 blocks by calling sync() alone. >
iostat used to count sectors which are 512 bytes long. Did you take that into account? > Lin > > > -----Original Message----- > > From: Vladimir V. Saveliev [mailto:[EMAIL PROTECTED] > > Sent: Tuesday, March 27, 2007 1:00 AM > > To: Lin Shen (lshen) > > Cc: [email protected] > > Subject: Re: Why reiser does a disk write on every sync() call? > > > > Hello > > > > On Monday 26 March 2007 22:12, Lin Shen (lshen) wrote: > > > I'm using iostat to measure disk reads/writes associated > > with various > > > file operations under Reiser. One thing I noticed and can't > > explain is > > > that every sync() call by itself (not following a write or > > anything) > > > will cause an I/O write. Any ideas? > > > > > > > The I/O write is performed by reiserfs implementation of > > sync_fs method of struct super_operations. > > If filesystem is mounted r/w - reiserfs_sync_fs begins a > > transaction (or joins an existing one), journal super block > > if the transaction has zero length, closes the transaction > > and flushes old transactions including the one which was just > > closed. So, if there were no transaction to flush before > > sync() - one transaction of length 1 gets created, closed, > > committed and flushed. 5 blocks get written to disk in this > > case. My calculation can be wrong, though. > > How much I/O do you notice? > > > > > Lin > > > > > > > > > >
