+cvs
+ - Fix a few more libxfs/repair leaks
+
xfsprogs-2.6.3 (19 January 2003)
- Merge Steve Langasek's work on the Debian installer
support for xfsprogs.
libxfs_umount(xfs_mount_t *mp)
{
manage_zones(1);
- free(mp->m_perag);
+ if (mp->m_perag) {
+ int agno;
+ for (agno = 0; agno < mp->m_maxagi; agno++) {
+ if (mp->m_perag[agno].pagb_list)
+ free(mp->m_perag[agno].pagb_list);
+ }
+ free(mp->m_perag);
+ }
}
XFS_BUF_COUNT(bp));
}
}
+ free(bplist);
return dabuf;
failed:
for (i = 0; i < nex; i++)
void
io_init(void)
{
- int i;
-
/* open up filesystem device */
ASSERT(fs_name != NULL && *fs_name != '\0');
if ((fs_fd = open (fs_name, (no_modify? O_RDONLY : O_RDWR))) < 0) {
do_error(_("couldn't open filesystem \"%s\"\n"), fs_name);
}
-
- /* initialize i/o buffers */
-
- iobuf_size = 1000 * 1024;
- smallbuf_size = 4 * 4096; /* enough for an ag */
-
- /*
- * sbbuf_size must be < XFS_MIN_AG_BLOCKS (64) * smallest block size,
- * otherwise you might get an EOF when reading in the sb/agf from
- * the last ag if that ag is small
- */
- sbbuf_size = 2 * 4096; /* 2 * max sector size */
-
- if ((iobuf = malloc(iobuf_size)) == NULL)
- do_error(_("couldn't malloc io buffer\n"));
-
- if ((smallbuf = malloc(smallbuf_size)) == NULL)
- do_error(_("couldn't malloc secondary io buffer\n"));
-
- for (i = 0; i < NUM_SBS; i++) {
- if ((sb_bufs[i] = malloc(sbbuf_size)) == NULL)
- do_error(_("couldn't malloc sb io buffers\n"));
- }
}
int find_secondary_sb(xfs_sb_t *sb);
-int check_growfs(xfs_off_t off, int bufnum, xfs_agnumber_t agnum);
-
void get_sb_geometry(fs_geometry_t *geo,
xfs_sb_t *sbp);
return (verify_sb(sbp, 0));
}
-#if 0
-int
-check_growfs(xfs_off_t off, int bufnum, xfs_agnumber_t agnum)
-{
- int rval;
-
- ASSERT(bufnum < NUM_SBS);
-
- /* try and read it first */
-
- if (lseek64(fs_fd, off, SEEK_SET) != off)
- return(XR_EOF);
-
- if ((rval = read(fs_fd, sb_bufs[bufnum], sbbuf_size)) != sbbuf_size) {
- /*
- * we didn't get a full block so the filesystem
- * could not have been grown. return a non-XR_OK
- * result code.
- */
- return(XR_EOF);
- }
-
- return(get_sb(off, bufnum, agnum));
-}
-#endif
/* returns element on list with highest reference count */
fs_geo_list_t *