summaryrefslogtreecommitdiff
path: root/usr/src/uts/common/sys/lofi.h
diff options
context:
space:
mode:
authoreschrock <none@none>2007-06-12 13:18:17 -0700
committereschrock <none@none>2007-06-12 13:18:17 -0700
commit3d7072f8bd27709dba14f6fe336f149d25d9e207 (patch)
treed325ae63ce74901b55494e8a0dc011b9e2e13d43 /usr/src/uts/common/sys/lofi.h
parenta5b881a79e40ec2c21d682e676b130a1ee3d2a73 (diff)
downloadillumos-joyent-3d7072f8bd27709dba14f6fe336f149d25d9e207.tar.gz
PSARC 2007/197 ZFS hotplug
PSARC 2007/283 FMA for ZFS Phase 2 6401126 ZFS DE should verify that diagnosis is still valid before solving cases 6500545 ZFS does not handle changes in devids 6508521 zpool online should warn when it is being used incorrectly 6509807 ZFS checksum ereports are not being posted 6514712 zfs_nicenum() doesn't work with perfectly-sized buffers 6520510 media state doesn't get updated properly on device removal 6520513 ZFS should have better support for device removal 6520514 vdev state should be controlled through a single ioctl() 6520519 ZFS should diagnose faulty devices 6520947 ZFS DE should close cases which no longer apply 6521393 ZFS case timeout should be FMD_TYPE_TIME 6521624 fmd_hash_walk() can dump core when given a bad address 6521946 ZFS DE needlessly subscribes to faults 6522085 ZFS dictionary files contain spelling errors 6523185 vdev_reopen() doesn't correctly propagate state 6523555 'zpool online' should be less chatty unless something goes wrong 6527379 zpool(1M) should not try to open faulted devices 6527700 ZFS should post a sysevent when topology changes 6528194 lofi should support force unmap and DKIO_DEV_GONE 6528732 ZFS should store physical device path in addition to /dev path 6532635 ZFS keeps devices open unnecessarily 6532979 bad argument to ZFS_IOC_VDEV_ATTACH can panic system 6567983 deadlock with spa_scrub_thread() and spa_namespace_lock
Diffstat (limited to 'usr/src/uts/common/sys/lofi.h')
-rw-r--r--usr/src/uts/common/sys/lofi.h26
1 files changed, 18 insertions, 8 deletions
diff --git a/usr/src/uts/common/sys/lofi.h b/usr/src/uts/common/sys/lofi.h
index a5f0eb1d97..362af884e3 100644
--- a/usr/src/uts/common/sys/lofi.h
+++ b/usr/src/uts/common/sys/lofi.h
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -92,13 +91,20 @@ extern "C" {
* ioctl(ld, LOFI_GET_MAXMINOR, &li);
* maxminor = li.li_minor;
*
+ * If the 'li_force' flag is set for any of the LOFI_UNMAP_* commands, then if
+ * the device is busy, the underlying vnode will be closed, and any subsequent
+ * operations will fail. It will behave as if the device had been forcibly
+ * removed, so the DKIOCSTATE ioctl will return DKIO_DEV_GONE. When the device
+ * is last closed, it will be torn down.
+ *
* Oh, and last but not least: these ioctls are totally private and only
* for use by lofiadm(1M).
*
*/
struct lofi_ioctl {
- uint32_t li_minor;
+ uint32_t li_minor;
+ boolean_t li_force;
char li_filename[MAXPATHLEN + 1];
};
@@ -134,9 +140,13 @@ extern uint32_t lofi_max_files;
((vtype == VREG) || (vtype == VBLK) || (vtype == VCHR))
struct lofi_state {
- char *ls_filename; /* filename to open */
- size_t ls_filename_sz;
- struct vnode *ls_vp; /* open vnode */
+ char *ls_filename; /* filename to open */
+ size_t ls_filename_sz;
+ struct vnode *ls_vp; /* open vnode */
+ kmutex_t ls_vp_lock; /* protects ls_vp */
+ kcondvar_t ls_vp_cv; /* signal changes to ls_vp */
+ uint32_t ls_vp_iocount; /* # pending I/O requests */
+ boolean_t ls_vp_closereq; /* force close requested */
u_offset_t ls_vp_size;
uint32_t ls_blk_open;
uint32_t ls_chr_open;