2006-01-16 16:50:04 +00:00
|
|
|
|
|
|
|
|
|
2008-01-31 10:31:39 -06:00
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-09-01 11:05:15 -04:00
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-02-27 17:23:27 -05:00
|
|
|
|
2008-05-21 17:03:22 +01:00
|
|
|
|
2009-10-02 11:54:39 +01:00
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
|
|
|
|
|
2006-02-27 17:23:27 -05:00
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-02-27 17:23:27 -05:00
|
|
|
|
2006-10-03 11:10:41 -04:00
|
|
|
|
2011-06-15 10:29:37 +01:00
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
2011-08-02 13:09:36 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-10-03 11:10:41 -04:00
|
|
|
|
2011-04-14 09:54:02 +01:00
|
|
|
|
2006-10-03 11:10:41 -04:00
|
|
|
|
2011-09-07 10:33:25 +01:00
|
|
|
|
2006-10-03 11:10:41 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-09-07 10:33:25 +01:00
|
|
|
|
2006-10-03 11:10:41 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-09-07 10:33:25 +01:00
|
|
|
|
2006-10-03 11:10:41 -04:00
|
|
|
|
2011-09-07 10:33:25 +01:00
|
|
|
|
2011-08-02 13:09:36 +01:00
|
|
|
|
2006-10-03 11:10:41 -04:00
|
|
|
|
2011-09-07 10:33:25 +01:00
|
|
|
|
2011-03-11 11:52:25 +00:00
|
|
|
|
2011-09-07 10:33:25 +01:00
|
|
|
|
2006-10-03 11:10:41 -04:00
|
|
|
|
2011-09-07 10:33:25 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-08-02 13:09:36 +01:00
|
|
|
|
2011-09-07 10:33:25 +01:00
|
|
|
|
|
|
|
|
|
2007-09-03 11:01:33 +01:00
|
|
|
|
2011-08-02 13:09:36 +01:00
|
|
|
|
2011-07-14 08:59:44 +01:00
|
|
|
|
2011-08-02 13:09:36 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-09-03 11:01:33 +01:00
|
|
|
|
2006-10-03 11:10:41 -04:00
|
|
|
|
2012-10-15 10:57:02 +01:00
|
|
|
|
2011-03-11 11:52:25 +00:00
|
|
|
|
2011-09-07 10:33:25 +01:00
|
|
|
|
2011-04-14 09:54:02 +01:00
|
|
|
|
2006-10-03 11:10:41 -04:00
|
|
|
|
2011-04-14 09:54:02 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-09-17 21:50:31 -05:00
|
|
|
|
2011-04-14 09:54:02 +01:00
|
|
|
|
2012-10-15 10:57:02 +01:00
|
|
|
|
2011-04-14 09:54:02 +01:00
|
|
|
|
|
|
|
|
|
2011-09-07 10:33:25 +01:00
|
|
|
|
2011-04-14 09:54:02 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-09-07 10:33:25 +01:00
|
|
|
|
2011-04-14 09:54:02 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-09-07 10:33:25 +01:00
|
|
|
|
2006-10-03 11:10:41 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-07-26 11:27:10 -04:00
|
|
|
|
|
|
|
|
|
2009-03-09 09:03:51 +00:00
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-03-09 09:03:51 +00:00
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
2009-12-08 12:12:13 +00:00
|
|
|
|
2011-08-31 16:38:29 +01:00
|
|
|
|
2009-03-09 09:03:51 +00:00
|
|
|
|
2007-01-22 12:15:34 -05:00
|
|
|
|
2009-03-09 09:03:51 +00:00
|
|
|
|
|
|
|
|
|
2012-10-15 10:57:02 +01:00
|
|
|
|
2009-03-09 09:03:51 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
GFS2: Use rbtree for resource groups and clean up bitmap buffer ref count scheme
Here is an update of Bob's original rbtree patch which, in addition, also
resolves the rather strange ref counting that was being done relating to
the bitmap blocks.
Originally we had a dual system for journaling resource groups. The metadata
blocks were journaled and also the rgrp itself was added to a list. The reason
for adding the rgrp to the list in the journal was so that the "repolish
clones" code could be run to update the free space, and potentially send any
discard requests when the log was flushed. This was done by comparing the
"cloned" bitmap with what had been written back on disk during the transaction
commit.
Due to this, there was a requirement to hang on to the rgrps' bitmap buffers
until the journal had been flushed. For that reason, there was a rather
complicated set up in the ->go_lock ->go_unlock functions for rgrps involving
both a mutex and a spinlock (the ->sd_rindex_spin) to maintain a reference
count on the buffers.
However, the journal maintains a reference count on the buffers anyway, since
they are being journaled as metadata buffers. So by moving the code which deals
with the post-journal accounting for bitmap blocks to the metadata journaling
code, we can entirely dispense with the rather strange buffer ref counting
scheme and also the requirement to journal the rgrps.
The net result of all this is that the ->sd_rindex_spin is left to do exactly
one job, and that is to look after the rbtree or rgrps.
This patch is designed to be a stepping stone towards using RCU for the rbtree
of resource groups, however the reduction in the number of uses of the
->sd_rindex_spin is likely to have benefits for multi-threaded workloads,
anyway.
The patch retains ->go_lock and ->go_unlock for rgrps, however these maybe also
be removed in future in favour of calling the functions directly where required
in the code. That will allow locking of resource groups without needing to
actually read them in - something that could be useful in speeding up statfs.
In the mean time though it is valid to dereference ->bi_bh only when the rgrp
is locked. This is basically the same rule as before, modulo the references not
being valid until the following journal flush.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Cc: Benjamin Marzinski <bmarzins@redhat.com>
2011-08-31 09:53:19 +01:00
|
|
|
|
2011-08-31 16:38:29 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-03-09 09:03:51 +00:00
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-03-09 09:03:51 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
|
|
|
|
|
2009-03-09 09:03:51 +00:00
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
2009-12-08 12:12:13 +00:00
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
2012-10-15 10:57:02 +01:00
|
|
|
|
2009-03-09 09:03:51 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-01-31 10:31:39 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
|
|
|
|
|
2007-01-22 12:15:34 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-08 12:12:13 +00:00
|
|
|
|
2007-11-02 08:39:34 +00:00
|
|
|
|
|
|
|
|
|
2007-01-22 12:15:34 -05:00
|
|
|
|
|
|
|
|
|
2009-03-09 09:03:51 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-01-22 12:15:34 -05:00
|
|
|
|
2012-10-15 10:57:02 +01:00
|
|
|
|
2009-03-09 09:03:51 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-01-22 12:15:34 -05:00
|
|
|
|
2009-03-09 09:03:51 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-04-20 08:58:45 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-01-22 12:15:34 -05:00
|
|
|
|
|
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-03-09 09:03:51 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-11-23 10:51:34 -05:00
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
2009-03-09 09:03:51 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-12-08 12:12:13 +00:00
|
|
|
|
2009-03-09 09:03:51 +00:00
|
|
|
|
2009-10-02 11:54:39 +01:00
|
|
|
|
2006-11-23 10:51:34 -05:00
|
|
|
|
2009-10-02 11:54:39 +01:00
|
|
|
|
2011-06-15 10:29:37 +01:00
|
|
|
|
2009-10-02 11:54:39 +01:00
|
|
|
|
2006-11-23 10:51:34 -05:00
|
|
|
|
|
|
|
|
|
2011-06-13 14:27:40 -05:00
|
|
|
|
|
|
|
|
|
2009-03-09 09:03:51 +00:00
|
|
|
|
2011-06-13 14:27:40 -05:00
|
|
|
|
2007-10-15 15:40:33 +01:00
|
|
|
|
2006-11-23 10:51:34 -05:00
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-11-20 13:39:47 +00:00
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
|
|
|
|
|
2011-01-19 09:30:01 +00:00
|
|
|
|
|
|
|
|
|
2008-11-20 13:39:47 +00:00
|
|
|
|
|
|
|
|
|
2011-01-19 09:30:01 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-11-20 13:39:47 +00:00
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
|
|
|
|
|
2011-05-09 13:49:59 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-10-28 14:13:29 +02:00
|
|
|
|
2011-05-09 13:49:59 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-01-31 22:08:10 -08:00
|
|
|
|
|
|
|
|
|
2011-05-09 13:49:59 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-06-16 14:06:55 +01:00
|
|
|
|
|
|
|
|
|
2011-05-09 13:49:59 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-11-18 13:38:48 +00:00
|
|
|
|
2006-02-27 17:23:27 -05:00
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
|
|
|
|
|
2008-04-29 12:35:48 -05:00
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
|
|
|
|
|
2006-11-01 16:05:38 -05:00
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-11-04 10:05:22 +00:00
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
2008-11-18 13:38:48 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-05-21 17:03:22 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-08-11 09:53:11 +01:00
|
|
|
|
2008-05-21 17:03:22 +01:00
|
|
|
|
|
|
|
|
|
2008-11-10 10:10:12 +00:00
|
|
|
|
|
|
|
|
|
2010-08-11 09:53:11 +01:00
|
|
|
|
2008-05-21 17:03:22 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
2007-11-02 08:39:34 +00:00
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-11-02 08:39:34 +00:00
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-05-21 17:03:22 +01:00
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
|
|
|
|
|
2006-06-14 15:32:57 -04:00
|
|
|
|
2006-02-27 17:23:27 -05:00
|
|
|
|
2006-10-13 21:47:13 -04:00
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
|
|
|
|
|
2008-05-21 17:03:22 +01:00
|
|
|
|
2006-11-20 10:37:45 -05:00
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-05-21 17:03:22 +01:00
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
|
|
|
|
|
2008-11-20 13:39:47 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-07-23 18:52:34 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-03-30 14:17:51 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-07-23 18:52:34 -05:00
|
|
|
|
|
|
|
|
|
2009-12-08 12:12:13 +00:00
|
|
|
|
2009-07-23 18:52:34 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-08-30 09:30:00 -04:00
|
|
|
|
2006-09-05 10:53:09 -04:00
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
|
|
|
|
|
2006-08-30 09:30:00 -04:00
|
|
|
|
2012-10-24 14:41:05 -04:00
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-05-21 17:03:22 +01:00
|
|
|
|
2006-09-05 10:53:09 -04:00
|
|
|
|
2009-12-08 12:12:13 +00:00
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
|
|
|
|
|
2006-08-30 09:30:00 -04:00
|
|
|
|
2012-10-24 14:41:05 -04:00
|
|
|
|
2009-03-09 09:03:51 +00:00
|
|
|
|
GFS2: Use rbtree for resource groups and clean up bitmap buffer ref count scheme
Here is an update of Bob's original rbtree patch which, in addition, also
resolves the rather strange ref counting that was being done relating to
the bitmap blocks.
Originally we had a dual system for journaling resource groups. The metadata
blocks were journaled and also the rgrp itself was added to a list. The reason
for adding the rgrp to the list in the journal was so that the "repolish
clones" code could be run to update the free space, and potentially send any
discard requests when the log was flushed. This was done by comparing the
"cloned" bitmap with what had been written back on disk during the transaction
commit.
Due to this, there was a requirement to hang on to the rgrps' bitmap buffers
until the journal had been flushed. For that reason, there was a rather
complicated set up in the ->go_lock ->go_unlock functions for rgrps involving
both a mutex and a spinlock (the ->sd_rindex_spin) to maintain a reference
count on the buffers.
However, the journal maintains a reference count on the buffers anyway, since
they are being journaled as metadata buffers. So by moving the code which deals
with the post-journal accounting for bitmap blocks to the metadata journaling
code, we can entirely dispense with the rather strange buffer ref counting
scheme and also the requirement to journal the rgrps.
The net result of all this is that the ->sd_rindex_spin is left to do exactly
one job, and that is to look after the rbtree or rgrps.
This patch is designed to be a stepping stone towards using RCU for the rbtree
of resource groups, however the reduction in the number of uses of the
->sd_rindex_spin is likely to have benefits for multi-threaded workloads,
anyway.
The patch retains ->go_lock and ->go_unlock for rgrps, however these maybe also
be removed in future in favour of calling the functions directly where required
in the code. That will allow locking of resource groups without needing to
actually read them in - something that could be useful in speeding up statfs.
In the mean time though it is valid to dereference ->bi_bh only when the rgrp
is locked. This is basically the same rule as before, modulo the references not
being valid until the following journal flush.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Cc: Benjamin Marzinski <bmarzins@redhat.com>
2011-08-31 09:53:19 +01:00
|
|
|
|
|
|
|
|
|
2009-05-20 10:48:47 +01:00
|
|
|
|
2006-09-05 10:53:09 -04:00
|
|
|
|
2012-11-14 13:46:53 -05:00
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
|
|
|
|
|
2006-08-30 09:30:00 -04:00
|
|
|
|
2012-10-24 14:41:05 -04:00
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
2008-11-20 13:39:47 +00:00
|
|
|
|
2006-09-05 10:53:09 -04:00
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
|
|
|
|
|
2006-08-30 09:30:00 -04:00
|
|
|
|
2006-09-05 10:53:09 -04:00
|
|
|
|
2009-07-23 18:52:34 -05:00
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
|
|
|
|
|
2006-08-30 09:30:00 -04:00
|
|
|
|
2006-09-05 10:53:09 -04:00
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
|
|
|
|
|
2006-08-30 09:30:00 -04:00
|
|
|
|
2006-09-05 10:53:09 -04:00
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
|
|
|
|
|
2006-08-30 09:30:00 -04:00
|
|
|
|
2006-09-05 10:53:09 -04:00
|
|
|
|
2012-11-14 13:46:53 -05:00
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
|
|
|
|
|
2006-08-30 09:30:00 -04:00
|
|
|
|
2006-09-05 10:53:09 -04:00
|
|
|
|
2006-01-16 16:50:04 +00:00
|
|
|
|
|
|
|
|
|
GFS2: Add a "demote a glock" interface to sysfs
This adds a sysfs file called demote_rq to GFS2's
per filesystem directory. Its possible to use this
file to demote arbitrary glocks in exactly the same
way as if a request had come in from a remote node.
This is intended for testing issues relating to caching
of data under glocks. Despite that, the interface is
generic enough to send requests to any type of glock,
but be careful as its not always safe to send an
arbitrary message to an arbitrary glock. For that reason
and to prevent DoS, this interface is restricted to root
only.
The messages look like this:
<type>:<glocknumber> <mode>
Example:
echo -n "2:13324 EX" >/sys/fs/gfs2/unity:myfs/demote_rq
Which means "please demote inode glock (type 2) number 13324 so that
I can get an EX (exclusive) lock". The lock modes are those which
would normally be sent by a remote node in its callback so if you
want to unlock a glock, you use EX, to demote to shared, use SH or PR
(depending on whether you like GFS2 or DLM lock modes better!).
If the glock doesn't exist, you'll get -ENOENT returned. If the
arguments don't make sense, you'll get -EINVAL returned.
The plan is that this interface will be used in combination with
the blktrace patch which I recently posted for comments although
it is, of course, still useful in its own right.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2009-02-12 13:31:58 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|