summaryrefslogtreecommitdiffstats
path: root/sys/fs/cd9660
Commit message (Collapse)AuthorAgeFilesLines
* Complete MPSAFE VFS interface and remove MNTK_MPSAFE flag.attilio2012-11-091-2/+1
| | | | | Porters should refer to __FreeBSD_version 1000021 for this change as it may have happened at the same timeframe.
* Use NULL instead of 0 for pointerskevlo2012-07-221-2/+2
|
* Remove unused thread argument to vrecycle().trasz2012-04-231-2/+1
| | | | Reviewed by: kib
* Remove fifo.h. The only used function declaration from the header iskib2012-03-111-1/+0
| | | | | | migrated to sys/vnode.h. Submitted by: gianni
* Remove unneeded cast to u_int. The values as small enough to fit intokib2012-03-041-2/+1
| | | | | | | int, beside the use of MIN macro which performs type promotions. Submitted by: bde MFC after: 3 weeks
* Remove unnecessary castskevlo2012-03-041-2/+2
|
* Fix found places where uio_resid is truncated to int.kib2012-02-211-2/+2
| | | | | | | | | Add the sysctl debug.iosize_max_clamp, enabled by default. Setting the sysctl to zero allows to perform the SSIZE_MAX-sized i/o requests from the usermode. Discussed with: bde, das (previous versions) MFC after: 1 month
* Remove an unnecessary cast.kevlo2012-02-201-1/+1
|
* Make sure all intermediate variables holding mount flags (mnt_flag)mckusick2012-01-171-1/+1
| | | | | | | and that all internal kernel calls passing mount flags are declared as uint64_t so that flags in the top 32-bits are not lost. MFC after: 2 weeks
* This update changes the mnt_flag field in the mount structure frommckusick2011-07-241-1/+1
| | | | | | | | | | 32 bits to 64 bits and eliminates the unused mnt_xflag field. The existing mnt_flag field is completely out of bits, so this update gives us room to expand. Note that the f_flags field in the statfs structure is already 64 bits, so the expanded mnt_flag field can be exported without having to make any changes in the statfs structure. Approved by: re (bz)
* Add a lock flags argument to the VFS_FHTOVP() file systemrmacklem2011-05-221-1/+2
| | | | | | | | | | | method, so that callers can indicate the minimum vnode locking requirement. This will allow some file systems to choose to return a LK_SHARED locked vnode when LK_SHARED is specified for the flags argument. This patch only adds the flag. It does not change any file system to use it and all callers specify LK_EXCLUSIVE, so file system semantics are not changed. Reviewed by: kib
* Remove prtactive variable and related printf()s in the vop_inactivekib2010-11-191-5/+0
| | | | | | | | and vop_reclaim() methods. They seems to be unused, and the reported situation is normal for the forced unmount. MFC after: 1 week X-MFC-note: keep prtactive symbol in vfs_subr.c
* The r184588 changed the layout of struct export_args, causing an ABIkib2010-10-102-2/+4
| | | | | | | | | | breakage for old mount(2) syscall, since most struct <filesystem>_args embed export_args. The mount(2) is supposed to provide ABI compatibility for pre-nmount mount(8) binaries, so restore ABI to pre-r184588. Requested and reviewed by: bde MFC after: 2 weeks
* Revert the previous commit. The race is not applicable to the lockmgrjhb2010-07-161-2/+0
| | | | | | | | implementation in 8.0 and later as its flags field does not hold dynamic state such as waiters flags, but is only modified in lockinit() aside from VN_LOCK_*(). Discussed with: attilio
* When the MNTK_EXTENDED_SHARED mount option was added, some filesystems werejhb2010-07-161-0/+2
| | | | | | | | | | | | | | changed to defer the setting of VN_LOCK_ASHARE() (which clears LK_NOSHARE in the vnode lock's flags) until after they had determined if the vnode was a FIFO. This occurs after the vnode has been inserted a VFS hash or some similar table, so it is possible for another thread to find this vnode via vget() on an i-node number and block on the vnode lock. If the lockmgr interlock (vnode interlock for vnode locks) is not held when clearing the LK_NOSHARE flag, then the lk_flags field can be clobbered. As a result the thread blocked on the vnode lock may never get woken up. Fix this by holding the vnode interlock while modifying the lock flags in this case. MFC after: 3 days
* On LP64 struct ifid is 64-bit aligned while struct fid is 32-bit alignedmarius2010-01-232-10/+17
| | | | | | | | so on architectures with strict alignment requirements we can't just simply cast the latter to the former but need to copy it bytewise instead. PR: 143010 MFC after: 3 days
* In vn_vget_ino() and their inline equivalents, mnt_ref() the mount pointkib2009-07-021-0/+2
| | | | | | | | | | | around the sequence that drop vnode lock and then busies the mount point. Not having vlocked node or direct reference to the mp allows for the forced unmount to proceed, making mp unmounted or reused. Tested by: pho Reviewed by: jeff Approved by: re (kensmith) MFC after: 2 weeks
* Update the inline version of vn_get_ino() for ".." lookups to match thejhb2009-06-121-6/+8
| | | | | | recentish changes to vn_get_ino(). MFC after: 1 week
* For cd9660_ioctl, check for recycled vnode after locking it.kib2009-06-101-0/+4
| | | | | Noted by: Jaakko Heinonen <jh saunalahti fi> MFC after: 2 weeks
* Fix r193923 by noting that type of a_fp is struct file *, not int.kib2009-06-101-1/+1
| | | | | | | It was assumed that r193923 was trivial change that cannot be done wrong. MFC after: 2 weeks
* s/a_fdidx/a_fp/ for VOP_OPEN comments that inline struct vop_open_argskib2009-06-101-1/+1
| | | | | | | definition. Discussed with: bde MFC after: 2 weeks
* VOP_IOCTL takes unlocked vnode as an argument. Due to this, v_data maykib2009-06-101-6/+17
| | | | | | | | | | | | be NULL or derefenced memory may become free at arbitrary moment. Lock the vnode in cd9660, devfs and pseudofs implementation of VOP_IOCTL to prevent reclaim; check whether the vnode was already reclaimed after the lock is granted. Reported by: georg at dts su Reviewed by: des (pseudofs) MFC after: 2 weeks
* Place hostnames and similar information fully under the prison system.jamie2009-05-291-9/+10
| | | | | | | | | | | | | | | | | The system hostname is now stored in prison0, and the global variable "hostname" has been removed, as has the hostname_mtx mutex. Jails may have their own host information, or they may inherit it from the parent/system. The proper way to read the hostname is via getcredhostname(), which will copy either the hostname associated with the passed cred, or the system hostname if you pass NULL. The system hostname can still be accessed directly (and without locking) at prison0.pr_host, but that should be avoided where possible. The "similar information" referred to is domainname, hostid, and hostuuid, which have also become prison parameters and had their associated global variables removed. Approved by: bz (mentor)
* Remove the thread argument from the FSD (File-System Dependent) parts ofattilio2009-05-111-9/+9
| | | | | | | | | | | | | | | | | the VFS. Now all the VFS_* functions and relating parts don't want the context as long as it always refers to curthread. In some points, in particular when dealing with VOPs and functions living in the same namespace (eg. vflush) which still need to be converted, pass curthread explicitly in order to retain the old behaviour. Such loose ends will be fixed ASAP. While here fix a bug: now, UFS_EXTATTR can be compiled alone without the UFS_EXTATTR_AUTOSTART option. VFS KPI is heavilly changed by this commit so thirdy parts modules needs to be recompiled. Bump __FreeBSD_version in order to signal such situation.
* Add a new internal mount flag (MNTK_EXTENDED_SHARED) to indicate that ajhb2009-03-111-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | filesystem supports additional operations using shared vnode locks. Currently this is used to enable shared locks for open() and close() of read-only file descriptors. - When an ISOPEN namei() request is performed with LOCKSHARED, use a shared vnode lock for the leaf vnode only if the mount point has the extended shared flag set. - Set LOCKSHARED in vn_open_cred() for requests that specify O_RDONLY but not O_CREAT. - Use a shared vnode lock around VOP_CLOSE() if the file was opened with O_RDONLY and the mountpoint has the extended shared flag set. - Adjust md(4) to upgrade the vnode lock on the vnode it gets back from vn_open() since it now may only have a shared vnode lock. - Don't enable shared vnode locks on FIFO vnodes in ZFS and UFS since FIFO's require exclusive vnode locks for their open() and close() routines. (My recent MPSAFE patches for UDF and cd9660 already included this change.) - Enable extended shared operations on UFS, cd9660, and UDF. Submitted by: ups Reviewed by: pjd (ZFS bits) MFC after: 1 month
* - Consolidate error handling in the cd9660 and udf mount routines.jhb2009-02-111-10/+8
| | | | | | | | | - Always read the character device pointer while the associated devfs vnode is locked. Also, use dev_ref() to obtain a new reference on the vnode for the mountpoint. This reference is released on unmount. This mirrors the earlier fix to FFS. Reviewed by: kib
* Use the correct field name for the size of the sierra_id. While thisimp2009-01-281-1/+1
| | | | | | is the same size as id, and is unlikely to change, it seems better to use the correct field here. There's no difference in the generated code.
* Mark cd9660 MPSAFE and add support for using shared vnode locks duringjhb2009-01-284-50/+114
| | | | | | | | | | | | | | | | | | | | | | pathname lookups. - Remove 'i_offset' and 'i_ino' from the ISO node structure and replace them with local variables in the lookup routine instead. - Cache a copy of 'i_diroff' for use during a lookup in a local variable. - Save a copy of the found directory entry in a malloc'd buffer after a successfull lookup before getting the vnode. This allows us to release the buffer holding the directory block before calling vget() which otherwise resulted in a LOR between "bufwait" and the vnode lock. - Use an inlined version of vn_vget_ino() to handle races with .. lookups. I had to inline the code here since cd9660 uses an internal vget routine to save a disk I/O that would otherwise re-read the directory block. - Honor the requested locking flags during lookups to allow for shared locking. - Honor the requested locking flags passed to VFS_ROOT() and VFS_VGET() similar to UFS. - Don't make every ISO 9660 vnode hold a reference on the vnode of the underlying device vnode of the mountpoint. The mountpoint already holds a suitable reference.
* Sync with ufs_vnops.c:1.245 and remove support for accessing device nodesjhb2009-01-281-3/+7
| | | | in ISO 9660 filesystems.
* Last step of splitting up minor and unit numbers: remove minor().ed2009-01-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | Inside the kernel, the minor() function was responsible for obtaining the device minor number of a character device. Because we made device numbers dynamically allocated and independent of the unit number passed to make_dev() a long time ago, it was actually a misnomer. If you really want to obtain the device number, you should use dev2udev(). We already converted all the drivers to use dev2unit() to obtain the device unit number, which is still used by a lot of drivers. I've noticed not a single driver passes NULL to dev2unit(). Even if they would, its behaviour would make little sense. This is why I've removed the NULL check. Ths commit removes minor(), minor2unit() and unit2minor() from the kernel. Because there was a naming collision with uminor(), we can rename umajor() and uminor() back to major() and minor(). This means that the makedev(3) manual page also applies to kernel space code now. I suspect umajor() and uminor() isn't used that often in external code, but to make it easier for other parties to port their code, I've increased __FreeBSD_version to 800062.
* The timezone byte is a signed value, treat it as such.kientzle2008-11-271-1/+1
| | | | | | | | | Otherwise, time zone information for time zones west of GMT gets discarded. PR: kern/128934 Submitted by: J.R. Oldroyd MFC after: 4 days
* - Support IEEE_P1282 and IEEE_1282 tags in the rock ridge extensions record.lulf2008-11-261-2/+6
| | | | | PR: kern/128942 Submitted by: "J.R. Oldroyd" <fbsd - at - opal.com>
* - Fix a typo in a comment.jhb2008-11-183-9/+5
| | | | | | - Whitespace fix. - Remove #if 0'd BSD 4.x code for flushing busy buffers from a mountpoint during an unmount. FreeBSD uses vflush() for this.
* When looking up the vnode for the device to mount the filesystem on,jhb2008-11-181-12/+8
| | | | | | ask NDINIT to return a locked vnode instead of letting it drop the lock and return a referenced vnode and then relock the vnode a few lines down. This matches the behavior of other filesystem mount routines.
* Remove copy/paste code from UFS to handle sparse blocks. While Rockjhb2008-11-181-6/+0
| | | | | Ridge does support sparse files, the cd9660 code does not currently support them.
* Remove unused i_flags field and IN_ACCESS flag from cd9660 in-memoryjhb2008-11-183-6/+0
| | | | i-nodes. cd9660 doesn't support access times.
* Introduce accmode_t. This is required for NFSv4 ACLs - it will be neccessarytrasz2008-10-282-7/+7
| | | | | | | to add more V* constants, and the variables changed by this patch were often being assigned to mode_t variables, which is 16 bit. Approved by: rwatson (mentor)
* Retire the MALLOC and FREE macros. They are an abomination unto style(9).des2008-10-233-8/+8
| | | | MFC after: 3 months
* Remove the struct thread unuseful argument from bufobj interface.attilio2008-10-101-8/+6
| | | | | | | | | | | | | | | | | | | | | In particular following functions KPI results modified: - bufobj_invalbuf() - bufsync() and BO_SYNC() "virtual method" of the buffer objects set. Main consumers of bufobj functions are affected by this change too and, in particular, functions which changed their KPI are: - vinvalbuf() - g_vfs_close() Due to the KPI breakage, __FreeBSD_version will be bumped in a later commit. As a side note, please consider just temporary the 'curthread' argument passing to VOP_SYNC() (in bufsync()) as it will be axed out ASAP Reviewed by: kib Tested by: Giovanni Trematerra <giovanni dot trematerra at gmail dot com>
* Fix Vflags abuse in cd9660. There should be no functional changes.trasz2008-10-031-7/+7
| | | | Approved by: rwatson (mentor)
* Step 1.5 of importing the network stack virtualization infrastructurezec2008-10-021-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | from the vimage project, as per plan established at devsummit 08/08: http://wiki.freebsd.org/Image/Notes200808DevSummit Introduce INIT_VNET_*() initializer macros, VNET_FOREACH() iterator macros, and CURVNET_SET() context setting macros, all currently resolving to NOPs. Prepare for virtualization of selected SYSCTL objects by introducing a family of SYSCTL_V_*() macros, currently resolving to their global counterparts, i.e. SYSCTL_V_INT() == SYSCTL_INT(). Move selected #defines from sys/sys/vimage.h to newly introduced header files specific to virtualized subsystems (sys/net/vnet.h, sys/netinet/vinet.h etc.). All the changes are verified to have zero functional impact at this point in time by doing MD5 comparision between pre- and post-change object files(*). (*) netipsec/keysock.c did not validate depending on compile time options. Implemented by: julian, bz, brooks, zec Reviewed by: julian, bz, brooks, kris, rwatson, ... Approved by: julian (mentor) Obtained from: //depot/projects/vimage-commit2/... X-MFC after: never Sponsored by: NLnet Foundation, The FreeBSD Foundation
* Decontextualize the couplet VOP_GETATTR / VOP_SETATTR as the passed threadattilio2008-08-281-3/+1
| | | | | | was always curthread and totally unuseful. Tested by: Giovanni Trematerra <giovanni dot trematerra at gmail dot com>
* Commit step 1 of the vimage project, (network stack)bz2008-08-171-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | virtualization work done by Marko Zec (zec@). This is the first in a series of commits over the course of the next few weeks. Mark all uses of global variables to be virtualized with a V_ prefix. Use macros to map them back to their global names for now, so this is a NOP change only. We hope to have caught at least 85-90% of what is needed so we do not invalidate a lot of outstanding patches again. Obtained from: //depot/projects/vimage-commit2/... Reviewed by: brooks, des, ed, mav, julian, jamie, kris, rwatson, zec, ... (various people I forgot, different versions) md5 (with a bit of help) Sponsored by: NLnet Foundation, The FreeBSD Foundation X-MFC after: never V_Commit_Message_Reviewed_By: more people than the patch
* Introduce a new lock, hostname_mtx, and use it to synchronize accessrwatson2008-07-051-0/+2
| | | | | | | | | | | | to global hostname and domainname variables. Where necessary, copy to or from a stack-local buffer before performing copyin() or copyout(). A few uses, such as in cd9660 and daemon_saver, remain under-synchronized and will require further updates. Correct a bug in which a failed copyin() of domainname would leave domainname potentially corrupted. MFC after: 3 weeks
* In cd9660_readdir vop, always initialize the idp->uio_off member.kib2008-06-111-0/+1
| | | | | | | | | | The while loop that is assumed to initialize the uio_off later, may be not entered at all, causing uninitialized value to be returned in uio->uio_offset. PR: 122925 Submitted by: Jaakko Heinonen <jh saunalahti fi> MFC after: 1 weeks
* Cleanup lockmgr interface and exported KPI:attilio2008-01-241-1/+1
| | | | | | | | | | | | | | | | | | | | - Remove the "thread" argument from the lockmgr() function as it is always curthread now - Axe lockcount() function as it is no longer used - Axe LOCKMGR_ASSERT() as it is bogus really and no currently used. Hopefully this will be soonly replaced by something suitable for it. - Remove the prototype for dumplockinfo() as the function is no longer present Addictionally: - Introduce a KASSERT() in lockstatus() in order to let it accept only curthread or NULL as they should only be passed - Do a little bit of style(9) cleanup on lockmgr.h KPI results heavilly broken by this change, so manpages and FreeBSD_version will be modified accordingly by further commits. Tested by: matteo
* VOP_LOCK1() (and so VOP_LOCK()) and VOP_UNLOCK() are only used inattilio2008-01-132-4/+3
| | | | | | | | | | | conjuction with 'thread' argument passing which is always curthread. Remove the unuseful extra-argument and pass explicitly curthread to lower layer functions, when necessary. KPI results broken by this change, which should affect several ports, so version bumping and manpage update will be further committed. Tested by: kris, pho, Diego Sardina <siarodx at gmail dot com>
* vn_lock() is currently only used with the 'curthread' passed as argument.attilio2008-01-102-3/+3
| | | | | | | | | | | | | | | | Remove this argument and pass curthread directly to underlying VOP_LOCK1() VFS method. This modify makes the code cleaner and in particular remove an annoying dependence helping next lockmgr() cleanup. KPI results, obviously, changed. Manpage and FreeBSD_version will be updated through further commits. As a side note, would be valuable to say that next commits will address a similar cleanup about VFS methods, in particular vop_lock1 and vop_unlock. Tested by: Diego Sardina <siarodx at gmail dot com>, Andrea Di Pasquale <whyx dot it at gmail dot com>
* Get rid of qaddr_t.alfred2007-10-161-3/+3
| | | | Requested by: bde
* Make insmntque() externally visibile and allow it to fail (e.g. duringtegge2007-03-131-2/+11
| | | | | | | | | | | | | | | | | | | | | | | late stages of unmount). On failure, the vnode is recycled. Add insmntque1(), to allow for file system specific cleanup when recycling vnode on failure. Change getnewvnode() to no longer call insmntque(). Previously, embryonic vnodes were put onto the list of vnode belonging to a file system, which is unsafe for a file system marked MPSAFE. Change vfs_hash_insert() to no longer lock the vnode. The caller now has that responsibility. Change most file systems to lock the vnode and call insmntque() or insmntque1() after a new vnode has been sufficiently setup. Handle failed insmntque*() calls by propagating errors to callers, possibly after some file system specific cleanup. Approved by: re (kensmith) Reviewed by: kib In collaboration with: kib
OpenPOWER on IntegriCloud