From owner-svn-soc-all@FreeBSD.ORG Sat Jun 23 10:05:30 2012 Return-Path: Delivered-To: svn-soc-all@FreeBSD.org Received: from socsvn.FreeBSD.org (unknown [IPv6:2001:4f8:fff6::2f]) by hub.freebsd.org (Postfix) with SMTP id 9724B1065679 for ; Sat, 23 Jun 2012 10:05:28 +0000 (UTC) (envelope-from oleksandr@FreeBSD.org) Received: by socsvn.FreeBSD.org (sSMTP sendmail emulation); Sat, 23 Jun 2012 10:05:28 +0000 Date: Sat, 23 Jun 2012 10:05:28 +0000 From: oleksandr@FreeBSD.org To: svn-soc-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <20120623100528.9724B1065679@hub.freebsd.org> Cc: Subject: socsvn commit: r238178 - soc2012/oleksandr/udf-head/sys/fs/udf2 X-BeenThere: svn-soc-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the entire Summer of Code repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Jun 2012 10:05:30 -0000 Author: oleksandr Date: Sat Jun 23 10:05:28 2012 New Revision: 238178 URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=238178 Log: Fix some bug Modified: soc2012/oleksandr/udf-head/sys/fs/udf2/udf_subr.c soc2012/oleksandr/udf-head/sys/fs/udf2/udf_subr.h soc2012/oleksandr/udf-head/sys/fs/udf2/udf_vfsops.c Modified: soc2012/oleksandr/udf-head/sys/fs/udf2/udf_subr.c ============================================================================== --- soc2012/oleksandr/udf-head/sys/fs/udf2/udf_subr.c Sat Jun 23 09:50:41 2012 (r238177) +++ soc2012/oleksandr/udf-head/sys/fs/udf2/udf_subr.c Sat Jun 23 10:05:28 2012 (r238178) @@ -27,7 +27,6 @@ #include #include -#include #include #include #include /* KASSERT */ @@ -161,7 +160,7 @@ /* not called often */ int -udf_update_discinfo(struct udf_mount *ump, uint64_t psize, uint32_t secsize) +udf_update_discinfo(struct udf_mount *ump, uint32_t sector_size, uint32_t psize) { struct vnode *devvp = ump->devvp; struct thread *td; @@ -200,7 +199,7 @@ /* TODO problem with last_possible_lba on resizable VND; request */ di->last_possible_lba = psize; - di->sector_size = secsize; + di->sector_size = sector_size; di->num_sessions = 1; di->num_tracks = 1; Modified: soc2012/oleksandr/udf-head/sys/fs/udf2/udf_subr.h ============================================================================== --- soc2012/oleksandr/udf-head/sys/fs/udf2/udf_subr.h Sat Jun 23 09:50:41 2012 (r238177) +++ soc2012/oleksandr/udf-head/sys/fs/udf2/udf_subr.h Sat Jun 23 10:05:28 2012 (r238178) @@ -34,7 +34,7 @@ /* device information updating */ int udf_update_trackinfo(struct udf_mount *ump, struct mmc_trackinfo *trackinfo); -int udf_update_discinfo(struct udf_mount *ump, uint64_t psize, uint32_t secsize); +int udf_update_discinfo(struct udf_mount *ump, uint32_t sector_size, uint32_t psize); int udf_search_tracks(struct udf_mount *ump, struct udf_args *args, int *first_tracknr, int *last_tracknr); //int udf_search_writing_tracks(struct udf_mount *ump); Modified: soc2012/oleksandr/udf-head/sys/fs/udf2/udf_vfsops.c ============================================================================== --- soc2012/oleksandr/udf-head/sys/fs/udf2/udf_vfsops.c Sat Jun 23 09:50:41 2012 (r238177) +++ soc2012/oleksandr/udf-head/sys/fs/udf2/udf_vfsops.c Sat Jun 23 10:05:28 2012 (r238178) @@ -514,26 +514,30 @@ if ((error = udf_update_discinfo(ump, cp->provider->sectorsize, cp->provider->mediasize))) { printf("UDF mount: error inspecting fs node\n"); - return error; + goto fail; } /* inspect sector size */ ump->sector_size = cp->provider->sectorsize; - sector_size = ump->discinfo.sector_size; + sector_size = ump->sector_size; bshift = 1; while ((1 << bshift) < sector_size) bshift++; if ((1 << bshift) != sector_size) { printf("UDF mount: " "hit implementation fence on sector size\n"); - return EIO; + error = EIO; + goto fail; + } /* temporary check to overcome sectorsize >= 8192 bytes panic */ if (sector_size >= 8192) { printf("UDF mount: " "hit implementation limit, sectorsize to big\n"); - return EIO; + error = EIO; + goto fail; + } /* @@ -543,12 +547,14 @@ if ((mp->mnt_flag & MNT_RDONLY) == 0) { if ((ump->discinfo.mmc_cur & MMC_CAP_RECORDABLE) == 0) { printf("UDF mount: disc is not recordable\n"); - return EROFS; + error = EROFS; + goto fail; } if (ump->discinfo.mmc_cur & MMC_CAP_SEQUENTIAL) { if (ump->discinfo.disc_state == MMC_STATE_FULL) { printf("UDF mount: disc is not appendable\n"); - return EROFS; + error = EROFS; + goto fail; } /* @@ -561,7 +567,8 @@ if (args->sessionnr != 0) { printf("UDF mount: updating a previous session " "not yet allowed\n"); - return EROFS; + error = EROFS; + goto fail; } //#endif }