From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Fri, 1 Jun 2007 18:14:54 +0400 From: Sergey Vlasov To: hardware@lists.altlinux.org Message-ID: <20070601141454.GE3921@newmaster.mivlgu.local> Mail-Followup-To: hardware@lists.altlinux.org References: <200705311027.04801.gosha@anti.su> <200706011010.28426.ave@zetetika.com.ua> <20070601120021.GN12012@osdn.org.ua> <200706011607.51012.ave@zetetika.com.ua> <20070601132934.GO12012@osdn.org.ua> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="BQPnanjtCNWHyqYD" Content-Disposition: inline In-Reply-To: <20070601132934.GO12012@osdn.org.ua> Subject: Re: [Hardware] SCSI RAID X-BeenThere: hardware@lists.altlinux.org X-Mailman-Version: 2.1.9rc1 Precedence: list Reply-To: hardware@lists.altlinux.org List-Id: ALT Linux hardware support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Jun 2007 14:14:54 -0000 Archived-At: List-Archive: List-Post: --BQPnanjtCNWHyqYD Content-Type: text/plain; charset=koi8-r Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jun 01, 2007 at 04:29:34PM +0300, Michael Shigorin wrote: > > =F0=CF=D0=CC=C1=CB=C1=CC=D3=D1 =C9 =CC=C1=C4=CE=CF... =F4.=C5. =DC=D4= =C1 =C6=C9=DE=C1 XFS =CE=C5=CF=D4=CB=CC=C0=DE=C1=C5=CD=C1? >=20 > =E2=CF=C0=D3=D8, =C4=C1. =F3=C1=CD =D7=CF=D4 =CE=C1=C4=C5=C0=D3=D8, =DE= =D4=CF =D7=D3=A3-=D4=C1=CB=C9 =D3=C4=C5=CC=C1=C0=D4 =D2=D5=C2=C9=CC=D8=CE= =C9=CB. =F7 =D3=C1=CD=D9=C8 =D3=D7=C5=D6=C9=C8 =D1=C4=D2=C1=C8 =D0=D2=C9=C4=C5=CC= =C1=CC=C9 =D3=CC=C5=C4=D5=C0=DD=C5=C5: [XFS] Fix to prevent the notorious 'NULL files' problem after a crash. =20 The problem that has been addressed is that of synchronising updates of the file size with writes that extend a file. Without the fix the update of a file's size, as a result of a write beyond eof, is independent of when the cached data is flushed to disk. Often the file size update wou= ld be written to the filesystem log before the data is flushed to disk. Wh= en a system crashes between these two events and the filesystem log is replayed on mount the file's size will be set but since the contents ne= ver made it to disk the file is full of holes. If some of the cached data w= as flushed to disk then it may just be a section of the file at the end th= at has holes. =20 There are existing fixes to help alleviate this problem, particularly in the case where a file has been truncated, that force cached data to be flushed to disk when the file is closed. If the system crashes while the file(s) are still open then this flushing will never occur. =20 The fix that we have implemented is to introduce a second file size, called the in-memory file size, that represents the current file size as viewed by the user. The existing file size, called the on-disk file siz= e, is the one that get's written to the filesystem log and we only update = it when it is safe to do so. When we write to a file beyond eof we only update the in- memory file size in the write operation. Later when the = I/O operation, that flushes the cached data to disk completes, an I/O completion routine will update the on-disk file size. The on-disk file size will be updated to the maximum offset of the I/O or to the value of the in-memory file size if the I/O includes eof. =F4.=C5., =D7=CD=C5=D3=D4=CF =C6=C1=CA=CC=CF=D7, =DA=C1=D0=CF=CC=CE=C5=CE= =CE=D9=C8 =CE=D5=CC=C5=D7=D9=CD=C9 =C2=C1=CA=D4=C1=CD=C9, =D7 =D3=CC=D5=DE= =C1=C5 =D3=C2=CF=D1 =C2=D5=C4=D5=D4 =D0=CF=D1=D7=CC=D1=D4=D8=D3=D1 =C6=C1=CA=CC=D9 =D5=D2=C5=DA=C1=CE=CE=CF=C7= =CF =D2=C1=DA=CD=C5=D2=C1, =D0=CF=D3=CB=CF=CC=D8=CB=D5 =D0=CF=CC=C5 =D2=C1= =DA=CD=C5=D2=C1 =C6=C1=CA=CC=C1 =CE=C1 =C4=C9=D3=CB=C5 =C2=D5=C4=C5=D4 =CF=C2=CE=CF=D7=CC=D1=D4=D8=D3=D1 =D4=CF=CC= =D8=CB=CF =D0=CF=D3=CC=C5 =C6=C1=CB=D4=C9=DE=C5=D3=CB=CF=CA =DA=C1=D0=C9=D3= =C9 =C4=C1=CE=CE=D9=C8 =CE=C1 =C4=C9=D3=CB. (=E8=CF=D4=D1 =D1 =CE=C5 =D5=D7=C5=D2=C5=CE, =DE=D4=CF =CE= =D5=CC=C9 =CE=C5 =D0=CF=D1=D7=D1=D4=D3=D1 =D7 =D3=CC=D5=DE=C1=C5, =C5=D3=CC= =C9 =D0=CF =CB=C1=CB=C9=CD-=D4=CF =D0=D2=C9=DE=C9=CE=C1=CD =C2=CC=CF=CB=C9 =C2=D5=C4= =D5=D4 =DA=C1=D0=C9=D3=D9=D7=C1=D4=D8=D3=D1 =CE=C1 =C4=C9=D3=CB =CE=C5 =D7 = =D4=CF=CD =D0=CF=D2=D1=C4=CB=C5, =D7 =CB=CF=D4=CF=D2=CF=CD =CF=CE=C9 =CE=C1=C8=CF=C4=D1=D4=D3=D1 =D7 =C6=C1=CA= =CC=C5 - =D7=D0=D2=CF=DE=C5=CD, =DC=D4=CF =CD=C1=CC=CF=D7=C5=D2=CF=D1=D4=CE= =CF.) --BQPnanjtCNWHyqYD Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFGYCneW82GfkQfsqIRApZUAKCSGh3w4gjLWe4nprL5HGBKxiuLuwCeJN4/ NSqX5okl99GDHdCtkMdf78E= =K9Db -----END PGP SIGNATURE----- --BQPnanjtCNWHyqYD--