From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934328AbZHENUi (ORCPT ); Wed, 5 Aug 2009 09:20:38 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S934319AbZHENUh (ORCPT ); Wed, 5 Aug 2009 09:20:37 -0400 Received: from mx.ugf.br ([200.222.48.3]:57969 "EHLO mx.ugf.br" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934316AbZHENUg (ORCPT ); Wed, 5 Aug 2009 09:20:36 -0400 Subject: Re: [PATCH 1/1] XFS: xfs_iformat realtime device target pointer check From: Ramon de Carvalho Valle To: Eric Sandeen Cc: Christoph Hellwig , xfs@oss.sgi.com, hch@lst.de, linux-kernel@vger.kernel.org, mszeredi@novell.com In-Reply-To: <4A790762.3010207@sandeen.net> References: <1249329808.7686.26.camel@logos> <20090803214929.GB3167@infradead.org> <1249351241.7513.18.camel@logos> <4A786110.8090404@sandeen.net> <1249411898.7576.19.camel@logos> <4A7887CE.2060300@sandeen.net> <1249444550.7372.23.camel@logos> <4A790762.3010207@sandeen.net> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-eGupLCjjG8bKSXdvQf7+" Date: Wed, 05 Aug 2009 10:21:26 -0300 Message-Id: <1249478486.7725.9.camel@logos> Mime-Version: 1.0 X-Mailer: Evolution 2.24.3 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --=-eGupLCjjG8bKSXdvQf7+ Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Tue, 2009-08-04 at 23:15 -0500, Eric Sandeen wrote: > Ramon de Carvalho Valle wrote: > > On Tue, 2009-08-04 at 14:11 -0500, Eric Sandeen wrote: > >> Ramon de Carvalho Valle wrote: > >>> The xfs_iformat function does not check if the realtime device target= pointer > >>> is valid when the XFS_DIFLAG_REALTIME flag is set on the ondisk inode > >>> structure. > >>> > >>> Signed-off-by: Christoph Hellwig > >>> Signed-off-by: Ramon de Carvalho Valle > >>> Cc: stable > >>> --- > >>> fs/xfs/xfs_inode.c | 23 +++++++++++++++++------ > >>> 1 files changed, 17 insertions(+), 6 deletions(-) > >>> > >>> diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c > >>> index 1f22d65..37d3ee5 100644 > >>> --- a/fs/xfs/xfs_inode.c > >>> +++ b/fs/xfs/xfs_inode.c > >>> @@ -343,13 +343,24 @@ xfs_iformat( > >>> return XFS_ERROR(EFSCORRUPTED); > >>> } > >>> =20 > >>> + if (unlikely((ip->i_d.di_flags & XFS_DIFLAG_REALTIME) && > >>> + !ip->i_mount->m_rtdev_targp)) { > >>> + xfs_fs_repair_cmn_err(CE_WARN, ip->i_mount, > >>> + "corrupt dinode %Lu, flags =3D 0x%x.", > >>> + (unsigned long long)ip->i_ino, > >>> + ip->i_d.di_flags); > >>> + XFS_CORRUPTION_ERROR("xfs_iformat(3)", XFS_ERRLEVEL_LOW, > >>> + ip->i_mount, dip); > >> I think I'd rather not change all the corruption text tag ordering; > >> it'll make it harder to track down any common occurrences of > >> "xfs_iformat(X)" corruption in the future if they get renumbered now. > >> > >> I'd either make this xfs_iformat(2.1) ;) or just leave it as Christoph > >> had. "realtime" is a lot more informative than "3" anyway. > >=20 > > I don't think this is a bad decision, because the corruption errors can > > be easily identified by the output of xfs_fs_repair_cmn_err and the > > source line. I think this is a reasonable change that will keep the cod= e > > clean and consistent. >=20 > Until you wind up looking at a problem from some old kernel, or modified > vendor kernel, and you realize that now you really don't know which > error "xfs_iformat(6)" is anymore, and you either have to go digging > through trees that aren't handy, or you just give up and don't bother to > help because now it's too much of a pain. ;) >=20 > But I can leave it up to the folks @ sgi, I can see both sides of the > argument, and I won't care too much either way. Yes, whatever they decide should be ok. Thanks for your feedback Eric. -Ramon >=20 > Thanks, > -Eric >=20 > > -Ramon > >=20 > >> -Eric >=20 >=20 --=-eGupLCjjG8bKSXdvQf7+ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEABECAAYFAkp5h1MACgkQGIS0iEuhp4PkPQCeNz6PGoKQQLEGheuHGjo03ayM MJYAnAmZcitfm1B+5IPpHFGQqxEtvEkO =4xfc -----END PGP SIGNATURE----- --=-eGupLCjjG8bKSXdvQf7+--