socsvn commit: r224061 -
soc2011/oleksandr/oleksandr-head/head/sys/sys
oleksandr at FreeBSD.org
oleksandr at FreeBSD.org
Fri Jul 8 21:44:23 UTC 2011
Author: oleksandr
Date: Fri Jul 8 21:44:21 2011
New Revision: 224061
URL: http://svnweb.FreeBSD.org/socsvn/?view=rev&rev=224061
Log:
Added new structure in header file for record error
Modified:
soc2011/oleksandr/oleksandr-head/head/sys/sys/devicestat.h
Modified: soc2011/oleksandr/oleksandr-head/head/sys/sys/devicestat.h
==============================================================================
--- soc2011/oleksandr/oleksandr-head/head/sys/sys/devicestat.h Fri Jul 8 21:41:12 2011 (r224060)
+++ soc2011/oleksandr/oleksandr-head/head/sys/sys/devicestat.h Fri Jul 8 21:44:21 2011 (r224061)
@@ -94,7 +94,13 @@
DEVSTAT_PRIORITY_ARRAY = 0x120,
DEVSTAT_PRIORITY_MAX = 0xfff
} devstat_priority;
-
+/*
+ * These flags indicates the type of disk error.
+ */
+typedef enum {
+ DEVSTAT_ERROR_RETRIABLE = 0x01,
+ DEVSTAT_ERROR_NON_RETRIABLE = 0x02
+} devstat_error_flags;
/*
* These types are intended to aid statistics gathering/display programs.
* The first 13 types (up to the 'target' flag) are identical numerically
@@ -128,7 +134,13 @@
DEVSTAT_TYPE_IF_MASK = 0x0f0,
DEVSTAT_TYPE_PASS = 0x100
} devstat_type_flags;
-
+/*
+ * The structure that contains the disk errors counter.
+ */
+struct devstat_device_error {
+ int retriable;
+ int non_retriable;
+};
/*
* XXX: Next revision should add
* off_t offset[DEVSTAT_N_TRANS_FLAGS];
@@ -159,6 +171,7 @@
* Time the device was
* created.
*/
+ struct devstat_device_error dev_error; /* Disk error structure.*/
u_int32_t block_size; /* Block size, bytes */
u_int64_t tag_types[3]; /*
* The number of
@@ -190,7 +203,7 @@
devstat_support_flags flags,
devstat_type_flags device_type,
devstat_priority priority);
-
+struct devstat *devstat_search(const char *dev_name, u_int32_t unit_namber);
void devstat_remove_entry(struct devstat *ds);
void devstat_start_transaction(struct devstat *ds, struct bintime *now);
void devstat_start_transaction_bio(struct devstat *ds, struct bio *bp);
@@ -199,6 +212,7 @@
devstat_trans_flags flags,
struct bintime *now, struct bintime *then);
void devstat_end_transaction_bio(struct devstat *ds, struct bio *bp);
+void devstat_add_error(struct devstat *ds, devstat_error_flags error_flag);
#endif
#endif /* _DEVICESTAT_H */
More information about the svn-soc-all
mailing list