lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20061108152533.GH30653@agk.surrey.redhat.com>
Date:	Wed, 8 Nov 2006 15:25:33 +0000
From:	Alasdair G Kergon <agk@...hat.com>
To:	"Rafael J. Wysocki" <rjw@...k.pl>
Cc:	Alasdair G Kergon <agk@...hat.com>, David Chinner <dgc@....com>,
	Eric Sandeen <sandeen@...hat.com>,
	Andrew Morton <akpm@...l.org>, linux-kernel@...r.kernel.org,
	dm-devel@...hat.com, Ingo Molnar <mingo@...e.hu>,
	Srinivasa DS <srinivasa@...ibm.com>
Subject: Re: [PATCH 2.6.19 5/5] fs: freeze_bdev with semaphore not mutex

On Wed, Nov 08, 2006 at 03:43:26PM +0100, Rafael J. Wysocki wrote:
> Will it be enough to cover the interactions with dm?
 
There are cases where you *cannot* freeze the filesystem (unless
you wait for userspace processes to finish what they are doing) -
and only dm can tell you that.

The freeze_filesystems() code ought to do it's best in any given 
circumstances within the constraints.

So:
  Get the filesystem's block device.
  Check the full tree of devices that that block device depends upon
and for any device that belongs to device-mapper check if it is suspended.
If it is, skip the original device.

  struct mapped_device *dm_get_md(dev_t dev);
  int dm_suspended(struct mapped_device *md);
  void dm_put(struct mapped_device *md);

Handling the tree is the difficult bit, but sysfs could help.
[You can get the device-mapper dependencies with:
  struct mapped_device *dm_get_md(dev_t dev);
  struct dm_table *dm_get_table(struct mapped_device *md);
  struct list_head *dm_table_get_devices(struct dm_table *t);
  void dm_table_put(struct dm_table *t);
  void dm_put(struct mapped_device *md);
]

Consider that you could have an already-frozen filesystem containing a loop
device containing a device-mapper device containing a not-frozen filesystem.
You won't be able to freeze that top filesystem because the I/O would
queue lower down the stack.  (Similar problem if the device-mapper device
in the stack was suspended.)

Alasdair
-- 
agk@...hat.com
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ