summaryrefslogtreecommitdiffstats
path: root/sys/fs/nandfs
Commit message (Collapse)AuthorAgeFilesLines
* sys: Make use of our rounddown() macro when sys/param.h is available.pfg2016-04-301-2/+2
| | | | No functional change.
* sys/fs: spelling fixes in comments.pfg2016-04-294-5/+5
| | | | No functional change.
* Cleanup unnecessary semicolons from the kernel.pfg2016-04-101-3/+3
| | | | Found with devel/coccinelle.
* [PR 206224] bv_cnt is sometimes examined without holding the bufobj lockrpokala2016-01-171-0/+5
| | | | | | | | | | | Add locking around access to bv_cnt which is currently being done unlocked PR: 206224 Reviewed by: imp Approved by: jhb MFC after: 1 week Sponsored by: Panasas, Inc. Differential Revision: https://reviews.freebsd.org/D4931
* File systems that do not use the buffer cache (such as ZFS) mustrmacklem2015-04-151-0/+1
| | | | | | | | | | | | | use VOP_FSYNC() to perform the NFS server's Commit operation. This patch adds a mnt_kern_flag called MNTK_USES_BCACHE which is set by file systems that use the buffer cache. If this flag is not set, the NFS server always does a VOP_FSYNC(). This should be ok for old file system modules that do not set MNTK_USES_BCACHE, since calling VOP_FSYNC() is correct, although it might not be optimal for file systems that use the buffer cache. Reviewed by: kib MFC after: 2 weeks
* nandfs_meta_bread() calls bread() which can set bp to NULL in someimp2015-03-011-1/+2
| | | | | | | error cases. Calling brelse() with a NULL pointer is not allowed, so only call brelse() when the bp is non-NULL. Reported by: Maxime Villard (reported as uninitialized variable)
* Do not leak 'copy' buffer if bmap_truncate_indirect fails.kan2015-02-281-0/+1
| | | | | Reported by: Brainy Code Scanner, by Maxime Villard. MFC after: 2 weeks
* Handle MAKEENTRY cnp flag in the VOP_CREATE(). Curiously, somekib2014-12-211-0/+2
| | | | | | | | fs, e.g. smbfs, already did it. Tested by: pho (previous version) Sponsored by: The FreeBSD Foundation MFC after: 2 weeks
* The VOP_LOOKUP() implementations for CREATE op do not put the namekib2014-12-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | into namecache, to avoid cache trashing when doing large operations. E.g., tar archive extraction is not usually followed by access to many of the files created. Right now, each VOP_LOOKUP() implementation explicitely knowns about this quirk and tests for both MAKEENTRY flag presence and op != CREATE to make the call to cache_enter(). Centralize the handling of the quirk into VFS, by deciding to cache only by MAKEENTRY flag in VOP. VFS now sets NOCACHE flag for CREATE namei() calls. Note that the change in semantic is backward-compatible and could be merged to the stable branch, and is compatible with non-changed third-party filesystems which correctly handle MAKEENTRY. Suggested by: Chris Torek <torek@pi-coral.com> Reviewed by: mckusick Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks
* Set the erase block size properly in the case the underlying mediaimp2014-08-021-2/+1
| | | | | | | doesn't advertise an erase block size. Submitted by: bjg@ Pointy hat to: imp@
* Follow the ufs practice for disallowing permission changes as well asimp2014-08-021-1/+1
| | | | | | writes to files for read-only file systems. Since there are already checks in nandfs_setattr that return an error, this moves detection of the error earlier.
* Fix a minor style(9) issue.imp2014-08-021-4/+2
|
* Fix typo in comment: noone -> no one.imp2014-07-231-7/+4
| | | | Fix minor style(9) nits.
* Check for the cross-device cross-link attempt in the VFS, instead ofkib2014-07-161-3/+0
| | | | | | | | | | | | | forcing filesystem VOP_LINK() methods to repeat the code. In tmpfs_link(), remove redundand check for the type of the source, already done by VFS. Note that NFS server already performs this check before calling VOP_LINK(). Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks
* Naughty NANDFS was using hidden unused flag, hiding the fact that theimp2014-07-071-3/+3
| | | | | | flag was used and wasn't really available. Change the name without fixing any laying issues that might be present in NANDFS' use of this flag.
* Take out the hack to write -1's to non-NAND. Always do a BIO_DELETE onimp2014-04-183-37/+3
| | | | | the ranges we want to erase. This is nicer to SSDs that want TRIMs anyway.
* More properly account for free/reserved segments to avoid deadlock orimp2014-04-184-7/+17
| | | | | | | | | worse when filling up a device and then trying to erase files to make space. Without enough space, you can't do that. Also, ensure that the metadata writes don't generate ENOSPC. They will be retried later since the buffers are still dirty... Submitted by: mjg@
* In sys/fs/nandfs/nandfs_vfsops.c, #if 0 an unused static function.dim2014-02-151-0/+2
| | | | MFC after: 3 days
* - Convert the bufobj lock to rwlock.jeff2013-05-312-2/+4
| | | | | | | | | | - Use a shared bufobj lock in getblk() and inmem(). - Convert softdep's lk to rwlock to match the bufobj lock. - Move INFREECNT to b_flags and protect it with the buf lock. - Remove unnecessary locking around bremfree() and BKGRDINPROG. Sponsored by: EMC / Isilon Storage Division Discussed with: mckusick, kib, mdf
* Remove the last use of the deprecated MNT_VNODE_FOREACH interface inkib2013-01-031-28/+4
| | | | | | | | the tree. With the help from: mjg Tested by: Ronald Klop <ronald-freebsd8@klop.yi.org> MFC after: 2 weeks
* Complete MPSAFE VFS interface and remove MNTK_MPSAFE flag.attilio2012-11-091-1/+0
| | | | | Porters should refer to __FreeBSD_version 1000021 for this change as it may have happened at the same timeframe.
* remove duplicate semicolons where possible.eadler2012-10-221-1/+1
| | | | | Approved by: cperciva MFC after: 1 week
* Prevent nump NULL pointer dereference in bmap_getlbns()kevlo2012-09-111-1/+2
|
* Catch a corner case where ssegs could be 0 and thus i would be 0 andmarcel2012-05-281-8/+7
| | | | | | we index suinfo out of bounds (i.e. -1). Approved by: gber
* Import work done under project/nand (@235533) into head.gber2012-05-1719-0/+11832
The NAND Flash environment consists of several distinct components: - NAND framework (drivers harness for NAND controllers and NAND chips) - NAND simulator (NANDsim) - NAND file system (NAND FS) - Companion tools and utilities - Documentation (manual pages) This work is still experimental. Please use with caution. Obtained from: Semihalf Supported by: FreeBSD Foundation, Juniper Networks
OpenPOWER on IntegriCloud