linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v6 0/2] blktrace: Fix deadlock problem
@ 2017-09-18 18:53 Waiman Long
  2017-09-18 18:53 ` [PATCH v6 1/2] blktrace: Fix potentail deadlock between delete & sysfs ops Waiman Long
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Waiman Long @ 2017-09-18 18:53 UTC (permalink / raw)
  To: Jens Axboe, Steven Rostedt, Ingo Molnar
  Cc: linux-kernel, linux-fsdevel, linux-block, linux-nilfs,
	cluster-devel, Bart Van Assche, Waiman Long

 v6:
  - Add a second patch to rename the bd_fsfreeze_mutex to
    bd_fsfreeze_blktrace_mutex.

 v5:
  - Overload the bd_fsfreeze_mutex in block_device structure for
    blktrace protection.

 v4:
  - Use blktrace_mutex in blk_trace_ioctl() as well.

 v3:
  - Use a global blktrace_mutex to serialize sysfs attribute accesses
    instead of the bd_mutex.

 v2:
  - Use READ_ONCE() and smp_store_mb() to read and write bd_deleting.
  - Check for signal in the mutex_trylock loops.
  - Use usleep() instead of schedule() for RT tasks.

This patchset fixes a potential blktrace deadlock problem between
block device deletion and sysfs operations.

Waiman Long (2):
  blktrace: Fix potentail deadlock between delete & sysfs ops
  block_dev: Rename bd_fsfreeze_mutex

 fs/block_dev.c          | 14 +++++++-------
 fs/gfs2/ops_fstype.c    |  6 +++---
 fs/nilfs2/super.c       |  6 +++---
 fs/super.c              |  6 +++---
 include/linux/fs.h      |  5 +++--
 kernel/trace/blktrace.c | 26 ++++++++++++++++++++------
 6 files changed, 39 insertions(+), 24 deletions(-)

-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2017-09-19 21:58 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-18 18:53 [PATCH v6 0/2] blktrace: Fix deadlock problem Waiman Long
2017-09-18 18:53 ` [PATCH v6 1/2] blktrace: Fix potentail deadlock between delete & sysfs ops Waiman Long
2017-09-19  0:01   ` Christoph Hellwig
2017-09-19 12:49     ` Waiman Long
2017-09-19 14:38       ` Christoph Hellwig
2017-09-19 15:58         ` Waiman Long
2017-09-19 20:41           ` Christoph Hellwig
2017-09-19 21:58             ` Steven Rostedt
2017-09-18 18:53 ` [PATCH v6 2/2] block_dev: Rename bd_fsfreeze_mutex Waiman Long
2017-09-18 23:47   ` Christoph Hellwig
2017-09-19 12:43     ` Waiman Long
2017-09-18 21:14 ` [PATCH v6 0/2] blktrace: Fix deadlock problem Steven Rostedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).