[Ocfs2-tools-devel] [PATCH 2/2] Ocfs2-tools: Update fswreck part to meet fsck's enhancement of solving multiply-claimed clusters.

tristan.ye tristan.ye at oracle.com
Tue Aug 11 19:02:35 PDT 2009


On Tue, 2009-08-11 at 15:01 -0700, Joel Becker wrote:
> On Sun, Aug 02, 2009 at 03:32:44PM +0800, Tristan Ye wrote:
> > +	if (type == DUP_CLUSTERS_SYSFILE_CLONE) {
> > +
> > +		di1->i_flags |= OCFS2_SYSTEM_FL;
> > +		di2->i_flags |= OCFS2_SYSTEM_FL;
> > +
> > +		err = ocfs2_write_inode(fs, inode1_blkno, (char *)di1);
> > +		if (err)
> > +			FSWRK_COM_FATAL(progname, err);
> > +		
> > +		err = ocfs2_write_inode(fs, inode2_blkno, (char *)di2);
> > +		if (err)
> > +			FSWRK_COM_FATAL(progname, err);
> > +
> > +		fprintf(stdout, "DUP_CLUSTERS_SYSFILE_CLONE: "
> > +			"Create two system inodes #%"PRIu64" and #%"PRIu64
> > +			" by allocating same cluster to them.\n",
> > +			inode1_blkno, inode2_blkno);
> 
> 	This isn't correct, unfortunately.  This will create regular
> files with the SYSTEM_FL flag set, which is invalid for ocfs2.  Instead,

Nod! I'll correct such 'fake' system files:-)

> you should create a new inode that has one extent pointing to an
> existing extent of an existing system file.  Perhaps one of the journal
> system files.
> 
> Joel
> 




More information about the Ocfs2-tools-devel mailing list