summaryrefslogtreecommitdiffstats
path: root/sys/fs
Commit message (Collapse)AuthorAgeFilesLines
...
* Add creation timestamp (birthtime) support for fuse.pfg2013-07-131-4/+1
| | | | | | | | | | | I was keeping this #ifdef'd for reference with the MacFUSE change[1] but on second thought, this is a FreeBSD-only header so the SVN history should be enough. Add missing padding while here. Reference [1]: http://code.google.com/p/macfuse/source/detail?spec=svn1686&r=1360
* Add creation timestamp (birthtime) support for fuse.pfg2013-07-122-0/+8
| | | | This is based on similar support in MacFUSE.
* Implement 1003.1-2001 pathconf() keys.pfg2013-07-101-9/+44
| | | | | | This is based on r106058 in UFS. MFC after: 1 month
* Reinstate the assertion from r253045.pfg2013-07-091-2/+2
| | | | | | | UFS r232732 reverted the change as the real problem was to be fixed at the syscall level. Reported by: bde
* Enhancement when writing an entire block of a file.pfg2013-07-091-9/+20
| | | | | | | | | | | Merge from UFS r231313: This change first attempts the uiomove() to the newly allocated (and dirty) buffer and only zeros it if the uiomove() fails. The effect is to eliminate the gratuitous zeroing of the buffer in the usual case where the uiomove() successfully fills it. MFC after: 3 days
* Add support for host-based (Kerberos 5 service principal) initiatorrmacklem2013-07-093-34/+33
| | | | | | | | credentials to the kernel rpc. Modify the NFSv4 client to add support for the gssname and allgssname mount options to use this capability. Requires the gssd daemon to be running with the "-h" option. Reviewed by: jhb
* Avoid a panic and return EINVAL instead.pfg2013-07-081-2/+2
| | | | | | | Merge from UFS r232692: syscall() fuzzing can trigger this panic. MFC after: 3 days
* Implement SEEK_HOLE/SEEK_DATA for ext2fs.pfg2013-07-071-0/+20
| | | | | | Merged from r236044 on UFS. MFC after: 3 days
* Fix some typos.pfg2013-07-071-3/+3
| | | | MFC after: 1 week
* Initial implementation of the HTree directory index.pfg2013-07-069-115/+1561
| | | | | | | | | | | | | | | | | | | This is a port of NetBSD's GSoC 2012 Ext3 HTree directory indexing by Vyacheslav Matyushin. It was cleaned up and enhanced for FreeBSD by Zheng Liu (lz@). This is an excellent example of work shared among different projects: Vyacheslav was able to look at an early prototype from Zheng Liu who was also able to check the code from Haiku (with permission). As in linux, the feature is not available by default and must be enabled explicitly with tune2fs. We still do not support the workarounds required in readdir for NFS. Submitted by: Zheng Liu Tested by: Mike Ma Sponsored by: Google Inc. MFC after: 1 week
* The tvp vnode on rename is usually unlinked. Drop the cached nullkib2013-07-041-1/+6
| | | | | | | | | vnode for tvp to allow the free of the lower vnode, if needed. PR: kern/180236 Tested by: smh Sponsored by: The FreeBSD Foundation MFC after: 1 week
* - Fix double frees/user after free.davide2013-07-031-113/+56
| | | | | | | - Allocate using smb_rq_alloc() instead of inlining it. Reported by: uqs Found with: Coverity Scan
* A problem with the old NFS client where large writes to large filesrmacklem2013-07-031-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | would sometimes result in a corrupted file was reported via email. This problem appears to have been caused by r251719 (reverting r251719 fixed the problem). Although I have not been able to reproduce this problem, I suspect it is caused by another thread increasing np->n_size after the mtx_unlock(&np->n_mtx) but before the vnode_pager_setsize() call. Since the np->n_mtx mutex serializes updates to np->n_size, doing the vnode_pager_setsize() with the mutex locked appears to avoid the problem. Unfortunately, vnode_pager_setsize() where the new size is smaller, cannot be called with a mutex held. This patch returns the semantics to be close to pre-r251719 (actually pre-r248567, r248581, r248567 for the new client) such that the call to vnode_pager_setsize() is only delayed until after the mutex is unlocked when np->n_size is shrinking. Since the file is growing when being written, I believe this will fix the corruption. A better solution might be to replace the mutex with a sleep lock, but that is a non-trivial conversion, so this fix is hoped to be sufficient in the meantime. Reported by: David G. Lawrence (dg@dglawrence.com) Tested by: David G. Lawrence (to be done soon) Reviewed by: kib MFC after: 1 week
* ext2fs: Use the complete random() range in i_gen.pfg2013-06-301-1/+1
| | | | | | | i_gen is unsigned in ext2fs so we can handle the complete 32 bits. MFC after: 1 week
* Bring some updates from ufs_lookup to ext2fs.pfg2013-06-291-8/+11
| | | | | | | | | | | | | | | | | | | | | | r156418: Don't set IN_CHANGE and IN_UPDATE on inodes for potentially suspended file systems. This could cause deadlocks when creating snapshots. (We can't do snapshots on ext2fs but it is useful to keep things in sync). r183079: - Only set i_offset in the parent directory's i-node during a lookup for non-LOOKUP operations. - Relax a VOP assertion for a DELETE lookup. r187528: Move the code from ufs_lookup.c used to do dotdot lookup, into the helper function. It is supposed to be useful for any filesystem that has to unlock dvp to walk to the ".." entry in lookup routine. MFC after: 5 days
* Properly use v_data field. This magically worked (even if wrong) untildavide2013-06-281-1/+1
| | | | | now because v_data is the first field of the structure, but it's not something we should rely on.
* Garbage collect an useless check. smp should be never NULL.davide2013-06-281-5/+0
|
* Plug a couple of leakages in smbfs_lookup().davide2013-06-281-3/+6
|
* Minor sorting.pfg2013-06-261-1/+1
| | | | MFC after: 3 days
* Define and use e2fs_lbn_t in ext2fs.pfg2013-06-237-12/+19
| | | | | | | | | | | | | | | | | | In line to what is done in UFS, define an internal type e2fs_lbn_t for the logical block numbers. This change is basically a no-op as the new type is unchanged (int32_t) but it may be useful as bumping this may be required for ext4fs. Also, as pointed out by Bruce Evans: -Use daddr_t for daddr in ext2_bmaparray(). This seems to improve reliability with the reallocblks option. - Add a cast to the fsbtodb() macro as in UFS. Reviewed by: bde MFC after: 3 days
* Fix r252074 so that it builds on 64bit arches.rmacklem2013-06-221-3/+1
|
* The NFSv4.1 LayoutCommit operation requires a valid offset and length.rmacklem2013-06-211-8/+20
| | | | | (0, 0 is not sufficient) This patch a loop for each file layout, using the offset, length of each file layout in a separate LayoutCommit.
* When the NFSv4.1 client is writing to a pNFS Data Server (DS), thermacklem2013-06-212-4/+25
| | | | | | | file's size attribute does not get updated. As such, it is necessary to invalidate the attribute cache before clearing NMODIFIED for pNFS. MFC after: 2 weeks
* Since some NFSv4 servers enforce the requirement for a reserved port#,rmacklem2013-06-211-6/+0
| | | | | | | | enable use of the (no)resvport mount option for NFSv4. I had thought that the RFC required that non-reserved port #s be allowed, but I couldn't find it in the RFC. MFC after: 2 weeks
* Rename some prefixes in the Block Group Descriptor fields to ext4bgd_pfg2013-06-201-6/+6
| | | | | | | Change prefix to avoid confusion and denote that these fields are generally only available starting with ext4. MFC after: 3 days
* More ext2fs header cleanups:pfg2013-06-182-12/+12
| | | | | | | - Set MAXMNTLEN nearer to where it is used. - Move EXT2_LINK_MAX to ext2_dir.h . MFC after: 3 days
* Rename remaining DIAGNOSTIC to INVARIANTS.pfg2013-06-171-1/+1
| | | | MFC after: 3 days
* Re-sort ext2fs headers to make things easier to find.pfg2013-06-166-56/+33
| | | | | | | | | | | | | | In the ext2fs driver we have a mixture of headers: - The ext2_ prefixed headers have strong influence from NetBSD and are carry specific ext2/3/4 information. - The unprefixed headers are inspired on UFS and carry implementation specific information. Do some small adjustments so that the information is easier to find coming from either UFS or the NetBSD implementation. MFC after: 3 days
* Relax some unnecessary unsigned type changes in ext2fs.pfg2013-06-132-10/+10
| | | | | | | | | | | | | While the changes in r245820 are in line with the ext2 spec, the code derived from UFS can use negative values so it is better to relax some types to keep them as they were, and somewhat more similar to UFS. While here clean some casts. Some of the original types are still wrong and will require more work. Discussed with: bde MFC after: 3 days
* Turn DIAGNOSTICs to INVARIANTS in ext2fs.pfg2013-06-125-16/+16
| | | | | | | This is done to be consistent with what other filesystems and particularly ffs already does (see r173464). MFC after: 5 days
* s/file system/filesystem/gpfg2013-06-113-8/+8
| | | | | | Based on r96755 from UFS. MFC after: 3 days
* e2fs_bpg and e2fs_isize are always unsigned.pfg2013-06-091-2/+2
| | | | | | | | | | The superblock in ext2fs defines all the fields as unsigned but for some reason the in-memory superblock was carrying e2fs_bpg and e2fs_isize as signed. We should preserve the specified types for consistency. MFC after: 5 days
* Add missing VM object unlocks in an error case.alc2013-06-071-0/+2
| | | | Reviewed by: kib
* Don't busy the page unless we are likely to release the object lock.alc2013-06-061-4/+7
| | | | | Reviewed by: kib Sponsored by: EMC / Isilon Storage Division
* Relax the vm object locking. Use a read lock.alc2013-06-051-5/+5
| | | | Sponsored by: EMC / Isilon Storage Division
* Eliminate unnecessary vm object locking from tmpfs_nocacheread().alc2013-06-041-2/+0
|
* ext2fs: space vs tab.pfg2013-06-032-2/+2
| | | | | Obtained from: Christoph Mallon MFC after: 3 days
* ext2fs: Small cosmetic fixes.pfg2013-06-032-2/+3
| | | | | | | Make a long macro readable and sort a header. Obtained from: Christoph Mallon MFC after: 3 days
* ext2fs: Update Block Group Descriptor struct.pfg2013-06-031-3/+7
| | | | | | | | | Uncover some, previously reserved, fields that are used by Ext4. These are currently unused but it is good to have them for future reference. Reviewed by: bde MFC after: 3 days
* - Convert the bufobj lock to rwlock.jeff2013-05-315-4/+7
| | | | | | | | | | - 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
* Assert that OBJ_TMPFS flag on the vm object for the tmpfs node iskib2013-05-301-0/+2
| | | | | | cleared when the tmpfs node is going away. Tested by: bdrewery, pho
* Post-r248567, there were times when the client would return armacklem2013-05-281-4/+2
| | | | | | | | | | | | truncated directory for some NFS servers. This turned out to be because the size of a directory reported by an NFS server can be smaller that the ufs-like directory created from the RPC XDR in the client. This patch fixes the problem by changing r248567 so that vnode_pager_setsize() is only done for regular files. Reported and tested by: hartmut.brandt@dlr.de Reviewed by: kib MFC after: 1 week
* Do not leak the NULLV_NOUNLOCK flag from the nullfs_unlink_lowervp(),kib2013-05-211-7/+19
| | | | | | | | | | for the case when the nullfs vnode is not reclaimed. Otherwise, later reclamation would not unlock the lower vnode. Reported by: antoine Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week
* Fix typo in comment.des2013-05-151-1/+1
| | | | | Submitted by: Alex Weber <alexwebr@gmail.com> MFC after: 1 week
* Add support for the eofflag to nfs_readdir() in the new NFSrmacklem2013-05-121-1/+8
| | | | | | | | client so that it works under a unionfs mount. Submitted by: Jared Yanovich (slovichon@gmail.com) Reviewed by: kib MFC after: 2 weeks
* Fix several typoseadler2013-05-121-1/+1
| | | | | | PR: kern/176054 Submitted by: Christoph Mallon <christoph.mallon@gmx.de> MFC after: 3 days
* fdescfs: Supply a real value for d_type in readdir.jilles2013-05-121-1/+1
| | | | | All the fdescfs nodes (except . and ..) appear as character devices to stat(), so DT_CHR is correct.
* - Fix nullfs vnode reference leak in nullfs_reclaim_lowervp(). Thekib2013-05-114-7/+50
| | | | | | | | | | | | | | | | | | | | | | | null_hashget() obtains the reference on the nullfs vnode, which must be dropped. - Fix a wart which existed from the introduction of the nullfs caching, do not unlock lower vnode in the nullfs_reclaim_lowervp(). It should be innocent, but now it is also formally safe. Inform the nullfs_reclaim() about this using the NULLV_NOUNLOCK flag set on nullfs inode. - Add a callback to the upper filesystems for the lower vnode unlinking. When inactivating a nullfs vnode, check if the lower vnode was unlinked, indicated by nullfs flag NULLV_DROP or VV_NOSYNC on the lower vnode, and reclaim upper vnode if so. This allows nullfs to purge cached vnodes for the unlinked lower vnode, avoiding excessive caching. Reported by: G??ran L??wkrantz <goran.lowkrantz@ismobile.com> Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks
* Avoid deactivating the page if it is already on a queue, only requeuekib2013-05-061-6/+10
| | | | | | | | | | the page. This both reduces the number of queues locking and avoids moving the active page to inactive list just because the page was read or written. Based on the suggestion by: alc Reviewed by: alc Tested by: pho
* Change VM_OBJECT_LOCK/UNLOCK() -> VM_OBJECT_WLOCK/WUNLOCK() to reflectdavide2013-05-041-8/+9
| | | | | | the recent switch of the vm object lock to a rwlock. Reported by: attilio
OpenPOWER on IntegriCloud