Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1277230
| From | Philipp Reisner <philipp.reisner@linbit.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 24/38] drbd: debugfs: expose ed_data_gen_id |
| Date | 2015-11-25 12:20 +0100 |
| Message-ID | <qyGhb-5xi-1@gated-at.bofh.it> (permalink) |
| References | <qyG7v-5tK-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Lars Ellenberg <lars.ellenberg@linbit.com>
The effective data generation ID may be interesting for debugging
purposes of scenarios involving diskless states.
Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
---
drivers/block/drbd/drbd_debugfs.c | 10 ++++++++++
drivers/block/drbd/drbd_int.h | 1 +
2 files changed, 11 insertions(+)
diff --git a/drivers/block/drbd/drbd_debugfs.c b/drivers/block/drbd/drbd_debugfs.c
index 6b88a35..96a0107 100644
--- a/drivers/block/drbd/drbd_debugfs.c
+++ b/drivers/block/drbd/drbd_debugfs.c
@@ -771,6 +771,13 @@ static int device_data_gen_id_show(struct seq_file *m, void *ignored)
return 0;
}
+static int device_ed_gen_id_show(struct seq_file *m, void *ignored)
+{
+ struct drbd_device *device = m->private;
+ seq_printf(m, "0x%016llX\n", (unsigned long long)device->ed_uuid);
+ return 0;
+}
+
#define drbd_debugfs_device_attr(name) \
static int device_ ## name ## _open(struct inode *inode, struct file *file) \
{ \
@@ -796,6 +803,7 @@ drbd_debugfs_device_attr(oldest_requests)
drbd_debugfs_device_attr(act_log_extents)
drbd_debugfs_device_attr(resync_extents)
drbd_debugfs_device_attr(data_gen_id)
+drbd_debugfs_device_attr(ed_gen_id)
void drbd_debugfs_device_add(struct drbd_device *device)
{
@@ -839,6 +847,7 @@ void drbd_debugfs_device_add(struct drbd_device *device)
DCF(act_log_extents);
DCF(resync_extents);
DCF(data_gen_id);
+ DCF(ed_gen_id);
#undef DCF
return;
@@ -854,6 +863,7 @@ void drbd_debugfs_device_cleanup(struct drbd_device *device)
drbd_debugfs_remove(&device->debugfs_vol_act_log_extents);
drbd_debugfs_remove(&device->debugfs_vol_resync_extents);
drbd_debugfs_remove(&device->debugfs_vol_data_gen_id);
+ drbd_debugfs_remove(&device->debugfs_vol_ed_gen_id);
drbd_debugfs_remove(&device->debugfs_vol);
}
diff --git a/drivers/block/drbd/drbd_int.h b/drivers/block/drbd/drbd_int.h
index 3efaf18..08f266e 100644
--- a/drivers/block/drbd/drbd_int.h
+++ b/drivers/block/drbd/drbd_int.h
@@ -835,6 +835,7 @@ struct drbd_device {
struct dentry *debugfs_vol_act_log_extents;
struct dentry *debugfs_vol_resync_extents;
struct dentry *debugfs_vol_data_gen_id;
+ struct dentry *debugfs_vol_ed_gen_id;
#endif
unsigned int vnr; /* volume number within the connection */
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 00/38] DRBD update Philipp Reisner <philipp.reisner@linbit.com> - 2015-11-25 12:10 +0100 [PATCH 24/38] drbd: debugfs: expose ed_data_gen_id Philipp Reisner <philipp.reisner@linbit.com> - 2015-11-25 12:20 +0100 [PATCH 16/38] drbd: add comment why we want to first call local-io-error, then send state Philipp Reisner <philipp.reisner@linbit.com> - 2015-11-25 12:20 +0100 [PATCH 05/38] drbd: Move enum write_ordering_e to drbd.h Philipp Reisner <philipp.reisner@linbit.com> - 2015-11-25 12:20 +0100 [PATCH 38/38] drbd: fix error path during resize Philipp Reisner <philipp.reisner@linbit.com> - 2015-11-25 12:20 +0100 [PATCH 31/38] lru_cache: Converted lc_seq_printf_status to return void Philipp Reisner <philipp.reisner@linbit.com> - 2015-11-25 12:20 +0100 [PATCH 14/38] drbd: drbdsetup detach of an unresponsive local disk should not block IO "forever" Philipp Reisner <philipp.reisner@linbit.com> - 2015-11-25 12:20 +0100 [PATCH 37/38] drbd: avoid potential deadlock during handshake Philipp Reisner <philipp.reisner@linbit.com> - 2015-11-25 12:20 +0100 [PATCH 22/38] drbd: Create a dedicated workqueue for sending acks on the control connection Philipp Reisner <philipp.reisner@linbit.com> - 2015-11-25 12:20 +0100 [PATCH 03/38] drbd: De-inline drbd_should_do_remote() and drbd_should_send_out_of_sync() Philipp Reisner <philipp.reisner@linbit.com> - 2015-11-25 12:20 +0100 [PATCH 23/38] drbd: prevent NULL pointer deref when resuming diskless primary Philipp Reisner <philipp.reisner@linbit.com> - 2015-11-25 12:20 +0100 [PATCH 13/38] drbd: drop remnants of connector -- we don't use it anymore in drbd 8.4 Philipp Reisner <philipp.reisner@linbit.com> - 2015-11-25 12:20 +0100 [PATCH 28/38] drbd: fix spurious alert level printk Philipp Reisner <philipp.reisner@linbit.com> - 2015-11-25 12:20 +0100 Re: [PATCH 00/38] DRBD update Jens Axboe <axboe@fb.com> - 2015-11-25 19:10 +0100
csiph-web