[TEST] NTFS patch
Poul-Henning Kamp
phk at phk.freebsd.dk
Sun Dec 12 03:25:59 PST 2004
Here is a combined patch for the two problems that's been
reported against NTFS after my mount changes.
Please test & report.
Index: fs/ntfs/ntfs_vfsops.c
===================================================================
RCS file: /home/ncvs/src/sys/fs/ntfs/ntfs_vfsops.c,v
retrieving revision 1.70
diff -u -r1.70 ntfs_vfsops.c
--- fs/ntfs/ntfs_vfsops.c 6 Dec 2004 20:22:16 -0000 1.70
+++ fs/ntfs/ntfs_vfsops.c 12 Dec 2004 11:23:45 -0000
@@ -333,7 +333,10 @@
/* Copy in the 8-bit to Unicode conversion table */
/* Initialize Unicode to 8-bit table from 8toU table */
ntfs_82u_init(ntmp, cs_local, cs_ntfs);
- ntfs_u28_init(ntmp, NULL, cs_local, cs_ntfs);
+ if (cs_local != NULL && cs_ntfs != NULL)
+ ntfs_u28_init(ntmp, NULL, cs_local, cs_ntfs);
+ else
+ ntfs_u28_init(ntmp, ntmp->ntm_82u, cs_local, cs_ntfs);
mp->mnt_data = (qaddr_t)ntmp;
Index: fs/ntfs/ntfs_vnops.c
===================================================================
RCS file: /home/ncvs/src/sys/fs/ntfs/ntfs_vnops.c,v
retrieving revision 1.46
diff -u -r1.46 ntfs_vnops.c
--- fs/ntfs/ntfs_vnops.c 1 Dec 2004 23:16:33 -0000 1.46
+++ fs/ntfs/ntfs_vnops.c 12 Dec 2004 11:23:45 -0000
@@ -97,9 +97,14 @@
int *a_runb;
} */ *ap;
{
+ struct vnode *vp = ap->a_vp;
+ struct fnode *fp = VTOF(vp);
+ struct ntnode *ip = FTONT(fp);
+ struct ntfsmount *ntmp = ip->i_mp;
+
dprintf(("ntfs_bmap: vn: %p, blk: %d\n", ap->a_vp,(u_int32_t)ap->a_bn));
if (ap->a_bop != NULL)
- *ap->a_bop = &ap->a_vp->v_bufobj;
+ *ap->a_bop = &ntmp->ntm_devvp->v_bufobj;
if (ap->a_bnp != NULL)
*ap->a_bnp = ap->a_bn;
if (ap->a_runp != NULL)
--
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG | TCP/IP since RFC 956
FreeBSD committer | BSD since 4.3-tahoe
Never attribute to malice what can adequately be explained by incompetence.
More information about the freebsd-current
mailing list