xfs
[Top] [All Lists]

BUG 800273 - repair & db need to write external log footer

To: dxm@xxxxxxxxxxxx
Subject: BUG 800273 - repair & db need to write external log footer
From: pv@xxxxxxxxxxxxx (nathans@xxxxxxxxxxxx)
Date: Fri, 25 Aug 2000 17:18:58 -0700 (PDT)
Cc: linux-xfs@xxxxxxxxxxx
Reply-to: sgi.bugs.xfs@xxxxxxxxxxxxxxxxx
Sender: owner-linux-xfs@xxxxxxxxxxx
Webexec: webpvsubmit,PvProjectIncident
Webpv: wobbly.melbourne.sgi.com
View Incident: 
http://co-op.engr.sgi.com/BugWorks/code/bwxquery.cgi?search=Search&wlong=1&view_type=Bug&wi=800273

Submitter : nathans                   Submitter Domain : engr               
Assigned Engineer : dxm               Assigned Domain : engr                
Assigned Group : xfs-linux            Category : software                   
Customer Reported : F                 Priority : 2                          
Project : xfs-linux                   Status : open                         
Description :
xfs_repair (and now xfs_db with Daniel's recent change) need to
be able to write the footer in an external log.  I've just pushed
write_log_footer into libxfs (was only used by mkfs previously),
to facilitate this.

repair does a device_zero on the log device in phase2, but doesn't
do a log footer write.  Daniel's new uuid command in db sets the
new filesystem uuid everywhere except for in the (external) log.

I'm not sure about the current procedural interface, however.
We currently pass in the log file name and in mkfs there's a
comment saying...
        /* Now that the device has been closed (which this function
         * depends on), mark the last block with the magic number and
         * uuid of this fs */

Seems to me we could do the log footer write before closing the
log device a few lines earlier in mkfs (just seek+write+close,
rather than the close+open+seek+write+close which we do
currently - I think so anyway - maybe I'm missing some subtelty
here though?).  To do this, we could just pass in the libxfs/sim
dev_t associated with the log device rather than the device name.

In fact, it'd probably simplify things further (and make the code
more consistent) to do a libxfs_getbuf, then a libxfs_writebuf to
the log device (wraps up the buffer alloc, memset, seek & write).

cheers.

<Prev in Thread] Current Thread [Next in Thread>
  • BUG 800273 - repair & db need to write external log footer, nathans@xxxxxxxxxxxx <=