Thread (21 messages) 21 messages, 3 authors, 2025-02-25

Re: [PATCHv3 2/7] block: move q->sysfs_lock and queue-freeze under show/store method

From: Hannes Reinecke <hare@suse.de>
Date: 2025-02-25 07:41:46

On 2/24/25 14:30, Nilay Shroff wrote:
In preparation to further simplify and group sysfs attributes which
don't require locking or require some form of locking other than q->
limits_lock, move acquire/release of q->sysfs_lock and queue freeze/
unfreeze under each attributes' respective show/store method.

While we are at it, also remove ->load_module() as it's used to load
the module before queue is freezed. Now as we moved queue-freeze under
->store(), we could load module directly from the attributes' store
method before we actually start freezing the queue. Currently, the
->load_module() is only used by "scheduler" attribute, so we now load
the relevant elevator module before we start freezing the queue in
elv_iosched_store().

Signed-off-by: Nilay Shroff <redacted>
---
  block/blk-sysfs.c | 210 +++++++++++++++++++++++++++++++---------------
  block/elevator.c  |  20 ++++-
  2 files changed, 162 insertions(+), 68 deletions(-)
Reviewed-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                  Kernel Storage Architect
hare@suse.de                                +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help