hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/drivers/s390/block/dasd_int.h
....@@ -187,6 +187,8 @@
187187
188188 void (*callback)(struct dasd_ccw_req *, void *data);
189189 void *callback_data;
190
+ unsigned int proc_bytes; /* bytes for partial completion */
191
+ unsigned int trkcount; /* count formatted tracks */
190192 };
191193
192194 /*
....@@ -268,7 +270,6 @@
268270 struct module *owner;
269271 char ebcname[8]; /* a name used for tagging and printks */
270272 char name[8]; /* a name used for tagging and printks */
271
- int max_blocks; /* maximum number of blocks to be chained */
272273
273274 struct list_head list; /* used for list of disciplines */
274275
....@@ -297,7 +298,7 @@
297298 * e.g. verify that new path is compatible with the current
298299 * configuration.
299300 */
300
- int (*verify_path)(struct dasd_device *, __u8);
301
+ int (*pe_handler)(struct dasd_device *, __u8);
301302
302303 /*
303304 * Last things to do when a device is set online, and first things
....@@ -307,6 +308,10 @@
307308 int (*online_to_ready) (struct dasd_device *);
308309 int (*basic_to_known)(struct dasd_device *);
309310
311
+ /*
312
+ * Initialize block layer request queue.
313
+ */
314
+ void (*setup_blk_queue)(struct dasd_block *);
310315 /* (struct dasd_device *);
311316 * Device operation functions. build_cp creates a ccw chain for
312317 * a block device request, start_io starts the request and
....@@ -367,6 +372,26 @@
367372 void (*disable_hpf)(struct dasd_device *);
368373 int (*hpf_enabled)(struct dasd_device *);
369374 void (*reset_path)(struct dasd_device *, __u8);
375
+
376
+ /*
377
+ * Extent Space Efficient (ESE) relevant functions
378
+ */
379
+ int (*is_ese)(struct dasd_device *);
380
+ /* Capacity */
381
+ int (*space_allocated)(struct dasd_device *);
382
+ int (*space_configured)(struct dasd_device *);
383
+ int (*logical_capacity)(struct dasd_device *);
384
+ int (*release_space)(struct dasd_device *, struct format_data_t *);
385
+ /* Extent Pool */
386
+ int (*ext_pool_id)(struct dasd_device *);
387
+ int (*ext_size)(struct dasd_device *);
388
+ int (*ext_pool_cap_at_warnlevel)(struct dasd_device *);
389
+ int (*ext_pool_warn_thrshld)(struct dasd_device *);
390
+ int (*ext_pool_oos)(struct dasd_device *);
391
+ int (*ext_pool_exhaust)(struct dasd_device *, struct dasd_ccw_req *);
392
+ struct dasd_ccw_req *(*ese_format)(struct dasd_device *,
393
+ struct dasd_ccw_req *, struct irb *);
394
+ int (*ese_read)(struct dasd_ccw_req *, struct irb *);
370395 };
371396
372397 extern struct dasd_discipline *dasd_diag_discipline_pointer;
....@@ -386,6 +411,7 @@
386411 #define DASD_EER_NOPATH 2
387412 #define DASD_EER_STATECHANGE 3
388413 #define DASD_EER_PPRCSUSPEND 4
414
+#define DASD_EER_NOSPC 5
389415
390416 /* DASD path handling */
391417
....@@ -451,6 +477,11 @@
451477 spinlock_t lock;
452478 };
453479
480
+struct dasd_format_entry {
481
+ struct list_head list;
482
+ sector_t track;
483
+};
484
+
454485 struct dasd_device {
455486 /* Block device stuff. */
456487 struct dasd_block *block;
....@@ -482,8 +513,10 @@
482513 spinlock_t mem_lock;
483514 void *ccw_mem;
484515 void *erp_mem;
516
+ void *ese_mem;
485517 struct list_head ccw_chunks;
486518 struct list_head erp_chunks;
519
+ struct list_head ese_chunks;
487520
488521 atomic_t tasklet_scheduled;
489522 struct tasklet_struct tasklet;
....@@ -514,6 +547,7 @@
514547 struct dentry *debugfs_dentry;
515548 struct dentry *hosts_dentry;
516549 struct dasd_profile profile;
550
+ struct dasd_format_entry format_entry;
517551 };
518552
519553 struct dasd_block {
....@@ -539,6 +573,10 @@
539573
540574 struct dentry *debugfs_dentry;
541575 struct dasd_profile profile;
576
+
577
+ struct list_head format_list;
578
+ spinlock_t format_lock;
579
+ atomic_t trkcount;
542580 };
543581
544582 struct dasd_attention_data {
....@@ -558,6 +596,7 @@
558596 #define DASD_STOPPED_SU 16 /* summary unit check handling */
559597 #define DASD_STOPPED_PM 32 /* pm state transition */
560598 #define DASD_UNRESUMED_PM 64 /* pm resume failed state */
599
+#define DASD_STOPPED_NOSPC 128 /* no space left */
561600
562601 /* per device flags */
563602 #define DASD_FLAG_OFFLINE 3 /* device is in offline processing */
....@@ -686,6 +725,18 @@
686725 return 0;
687726 }
688727
728
+/*
729
+ * return the callback data of the original request in case there are
730
+ * ERP requests build on top of it
731
+ */
732
+static inline void *dasd_get_callback_data(struct dasd_ccw_req *cqr)
733
+{
734
+ while (cqr->refers)
735
+ cqr = cqr->refers;
736
+
737
+ return cqr->callback_data;
738
+}
739
+
689740 /* externals in dasd.c */
690741 #define DASD_PROFILE_OFF 0
691742 #define DASD_PROFILE_ON 1
....@@ -700,7 +751,9 @@
700751
701752 struct dasd_ccw_req *
702753 dasd_smalloc_request(int, int, int, struct dasd_device *, struct dasd_ccw_req *);
754
+struct dasd_ccw_req *dasd_fmalloc_request(int, int, int, struct dasd_device *);
703755 void dasd_sfree_request(struct dasd_ccw_req *, struct dasd_device *);
756
+void dasd_ffree_request(struct dasd_ccw_req *, struct dasd_device *);
704757 void dasd_wakeup_cb(struct dasd_ccw_req *, void *);
705758
706759 struct dasd_device *dasd_alloc_device(void);
....@@ -727,6 +780,7 @@
727780 int dasd_sleep_on(struct dasd_ccw_req *);
728781 int dasd_sleep_on_queue(struct list_head *);
729782 int dasd_sleep_on_immediatly(struct dasd_ccw_req *);
783
+int dasd_sleep_on_queue_interruptible(struct list_head *);
730784 int dasd_sleep_on_interruptible(struct dasd_ccw_req *);
731785 void dasd_device_set_timer(struct dasd_device *, int);
732786 void dasd_device_clear_timer(struct dasd_device *);
....@@ -750,6 +804,8 @@
750804 enum uc_todo dasd_generic_uc_handler(struct ccw_device *, struct irb *);
751805 void dasd_generic_path_event(struct ccw_device *, int *);
752806 int dasd_generic_verify_path(struct dasd_device *, __u8);
807
+void dasd_generic_space_exhaust(struct dasd_device *, struct dasd_ccw_req *);
808
+void dasd_generic_space_avail(struct dasd_device *);
753809
754810 int dasd_generic_read_dev_chars(struct dasd_device *, int, void *, int);
755811 char *dasd_get_sense(struct irb *);