- Take the vnode attributes from the NAME attribute.
- Remove now unused ntfs_times() and ntfs_filesize().
- Treat nodes without an unnamed DATA attribute as zero-sized regular files.
- Fix ntfs_loadntnode() to always read full cluster to prevent buffer
cache inconsistency.
- Change ntfs_vgetex() and ntfs_fget() to take a const attrname and
always pass a possibly empty string.
- Change printf to dprintf.
- Get rid of dead fields i_next, i_prev of struct ntnode.
There are a few situations where we must take care of the cache if direct
I/O was enabled:
- if we do direct I/O for write but not for read, then any write must
invalidate the cache so that a reader gets the written data and not
the not-updated cache.
- if we used a vnode without direct I/O and it is enabled for writing,
we must flush the cache before compeling the open operation, so that
the cachec write are not lost.
And at inactive time, we wipe direct I/O flags so that a new open without
direct I/O does not inherit direct I/O.
When puffs_cookie2vnode() misses an entry, vcache_get()
creates a new node (puffs_vfsop_loadvnode being called to
initialize the PUFFS part), then it discovers it is VNON,
and tries to vrele() it. vrele() calls VOP_INACTIVE(),
which led us in puffs_vnop_inactive() where we sent a
request to the filesystem for a node that already had been
reclaimed.
The fix is to check for VNON nodes in puffs_vnop_inactive()
and to return without doing anyting. This is suboptimal, but
a better workaround would probably need to modify vcache API,
with an impact on other filesystems. Let us keep it simple.
fail without taking down the kernel. It seems this is not the case anymore,
hence we can stop dropping errors in puffs_vnop_strategy()
Approved by pooka@
- Calling getnewvnode() with "mp == NULL" is wrong. Stop attaching a
vnode to system file nodes and change nilfs_bread() to translate
the block address and then uyse the device for the read.
- Move the vnode initialisation to nilfs_get_node() and use
nilfs_get_node_raw() to initialise the nilfs node only.
- Same for nilfs_reclaim() versus nilfs_dispose_node().
- Change nilfs_get_node() to return an unlocked vnode instead of
a nilfs node with locked vnode. Adapt nilfs_lookup() and nilfs_root().
- Don't treat unsupported node types (blk, chr ...) as regular,
return ENXIO instead.
- Fix nilfs_getattr() to mask the mode with ALLPERMS.
- Destroy sync_cv before free.
1) do it only if the file is open for writing, otherwise we send write
requests to the FS on a file that has never been open.
2) do it inside existing if (vap->va_size != VNOVAL) block
In the PUFFSDEBUG case, wrap do { ... } while (/*CONSTCOND*/0)
around the definitions. In the non-PUFFSDEBUG case, define them
as ((void)0) instead of as empty.
an endless loop of indirect descriptors being processed.
The number of indirect descriptors followed is now maximized.
While here, also fix a use-after-free bug!
- Always update kernel metadata cache for size when writing
This fixes situation where size update after appending to a file lagged
- Make read/write nilpotent when called with null size, as FFS does
- Return EFBIG instead of EINVAL for negative offsets, as FFS does
- Use (type, minor) as key.
- Change ptyfs_allocvp to return a referenced vnode and lock where needed.
- Remove unneeded vnode backpointer ptyfs_vnode.
- Keep a single hashlist for pty nodes to make their attributes persistent.
OK: Christos Zoulas
the vnode lifecycle.
- No longer set "recycle" on VOP_INACTIVE().
- Make ptyfs_used_get() private to ptyfs_subr.c
- Stop copying device attributes from traditional ptys on first allocation.
- Remove unneeded argument "lwp" from ptyfs_allocvp() and ptyfs_free_get().
OK: Christos Zoulas
contents, not on inode access rights and ownership changes. Should address
PR kern/49033 for UDF.
Test results now come clean for bugs related to this issue in the ATF.
find.
The filesystem ones all call genfs_eopnotsupp - right now I am only
implementing the plumbing and we can implement fallocate and/or
fdiscard for files later.
The device ones call spec_fallocate (which is also genfs_eopnotsupp)
and spec_fdiscard, which dispatches to the device-level op.
The fifo ones all call vn_fifo_bypass, which also ends up being
EOPNOTSUPP.
overflow on extremely low secsize. This normally conforms to the old standard
(for which there doesn't seem to be a clear spec). Since 2011, IDEMA's Advanced
Format standardizes it to 4k, so this change won't cause any trouble on
new devices.
Put the printf under DIAGNOSTIC temporarily to see if someone complains.
after a quick discussion on tech-kern
also fixes a division-by-zero bug that could crash the system.
- Define GEMDOSFS_BSIZE instead of a hard-coded 512 value, and remove 'bsize'.
- Rename 'tmp' to 'BlkPerSec'.
From me, FreeBSD, OpenBSD and the FAT specification.
ok christos@
- Use (dir_cluster, dir_offset, dir_generation) as key, where
dir_generation is non-zero and unique for unlinked but open nodes.
- Change deget() to return a vnode as it is unsafe to return a
referenced but unlocked denode.
and always reread the directory entry by inumber. For directories
the directory entry is always its "." entry.
Always read directories via the device vnode to prevent buffer cache
inconsistency. Keep i_devvp as a hint for fstat(1) and friends and
always use im_devvp for reads. No need to vref()/vrele() i_devvp.
The additional bread is either cached because cd9660_lookup() just
released the buffer or will be used in the near future when the
directory gets traversed during lookup.
No objections on tech-kern@
by uvmexp.freetarg, as discussed on tech-kern.
Main purpose is to make tmpfs usable (as far as possible) on small memory
machines.
This is a bit experimental, but we need to give it some real world exposure
to see how well it works.
need to vget() vnodes that we are not interested at, and optimize locking
a bit. Iterator changes reviewed by Hannken (thanks), the rest of the bugs
are mine.
- ifdef out some code that is only used for NO_DEV_PTM
- pass the mountpoint instead of the ptm structure to the implementation
dependent (ptyfs or bsdpty) functions.
- add a function to return the correct ptyfs mountpoint for the current lwp
Add two little helpers to lock or unlock a node. Use "vp" for the
union node and "lockvp" for the node to be locked. Use ISSET() to
test flags, add assertions.