diff options
author | imp <imp@FreeBSD.org> | 2014-04-18 17:03:43 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2014-04-18 17:03:43 +0000 |
commit | af1f03cbf480161e858291b0269b7b3dcf85ffa3 (patch) | |
tree | 5768dfe6f397f0a1b1b83565a6fbf0faa2eb443e /sys/fs/nandfs/nandfs_vfsops.c | |
parent | dc1d630338e8d8a813fdacbb556799df5848769f (diff) | |
download | FreeBSD-src-af1f03cbf480161e858291b0269b7b3dcf85ffa3.zip FreeBSD-src-af1f03cbf480161e858291b0269b7b3dcf85ffa3.tar.gz |
Take out the hack to write -1's to non-NAND. Always do a BIO_DELETE on
the ranges we want to erase. This is nicer to SSDs that want TRIMs
anyway.
Diffstat (limited to 'sys/fs/nandfs/nandfs_vfsops.c')
-rw-r--r-- | sys/fs/nandfs/nandfs_vfsops.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/fs/nandfs/nandfs_vfsops.c b/sys/fs/nandfs/nandfs_vfsops.c index 33b7564..eba4b4c 100644 --- a/sys/fs/nandfs/nandfs_vfsops.c +++ b/sys/fs/nandfs/nandfs_vfsops.c @@ -913,7 +913,6 @@ nandfs_mount_device(struct vnode *devvp, struct mount *mp, * We conclude that this is not NAND storage */ nandfsdev->nd_erasesize = NANDFS_DEF_ERASESIZE; - nandfsdev->nd_is_nand = 0; } else { DROP_GIANT(); g_topology_lock(); @@ -924,11 +923,10 @@ nandfs_mount_device(struct vnode *devvp, struct mount *mp, free(nandfsdev, M_NANDFSMNT); return (error); } - } else { - nandfsdev->nd_erasesize = erasesize; - nandfsdev->nd_is_nand = 1; } + nandfsdev->nd_erasesize = erasesize; + DPRINTF(VOLUMES, ("%s: erasesize %x\n", __func__, nandfsdev->nd_erasesize)); |