* [Bug 14354] Status of barrier requests in LVM and dm-crypt? @ 2009-10-12 18:15 Theodore Ts'o 2009-10-13 14:49 ` Mike Snitzer 0 siblings, 1 reply; 3+ messages in thread From: Theodore Ts'o @ 2009-10-12 18:15 UTC (permalink / raw) To: dm-devel; +Cc: linux-ext4, bugzilla-daemon Hi, I'm trying to track down a problem relating to ext4 problems, in kernel bugzilla 14354. Originally it was thought this was a regression 2.6.31->2.6.32-rc1 regression, but the Aneesh Kumar's report shows a very similar fsck transcript using a 2.6.30-1 kernel (which makes makes it unclear whether this is really a regression or not), and all three reports are tied together by the use of device-mapper. The fsck logs are consistent barriers being disabled. As I recall under some circumstances device mapper silently drops barrier requests --- I thought this was fixed for device mapper in some cases. What's the current status of barrier requests in device mapper? Are they faithfully passed for standard (non-RAID) LVM2 volumes? When was this changed? What about dm-crypto volumes? (One of the reports was with a dm-crypt volume from what I can tell.) Thanks, - Ted ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Bug 14354] Status of barrier requests in LVM and dm-crypt? 2009-10-12 18:15 [Bug 14354] Status of barrier requests in LVM and dm-crypt? Theodore Ts'o @ 2009-10-13 14:49 ` Mike Snitzer 2009-10-15 19:10 ` Mikulas Patocka 0 siblings, 1 reply; 3+ messages in thread From: Mike Snitzer @ 2009-10-13 14:49 UTC (permalink / raw) To: Theodore Ts'o; +Cc: Mikulas Patocka, dm-devel, linux-ext4, bugzilla-daemon On Mon, Oct 12 2009 at 2:15pm -0400, Theodore Ts'o <tytso@mit.edu> wrote: > Hi, I'm trying to track down a problem relating to ext4 problems, in > kernel bugzilla 14354. Originally it was thought this was a regression > 2.6.31->2.6.32-rc1 regression, but the Aneesh Kumar's report shows a > very similar fsck transcript using a 2.6.30-1 kernel (which makes makes > it unclear whether this is really a regression or not), and all three > reports are tied together by the use of device-mapper. > > The fsck logs are consistent barriers being disabled. As I recall under > some circumstances device mapper silently drops barrier requests --- I > thought this was fixed for device mapper in some cases. What's the > current status of barrier requests in device mapper? Are they > faithfully passed for standard (non-RAID) LVM2 volumes? When was this > changed? What about dm-crypto volumes? (One of the reports was with a > dm-crypt volume from what I can tell.) Barrier infrastructure started to get added to the DM core in 2.6.30, see: http://git.kernel.org/linus/af7e466a1ace But barriers were not enabled for all DM targets (_except_ dm-multipath) until 2.6.31. So 2.6.31's dm-crypt does support barriers, see: http://git.kernel.org/linus/647c7db14ef9 If the underlying device(s) support barriers DM should faithfully pass them on (again except for dm-multipath). Also, requests with barriers that result in -EOPNOTSUPP are retried without the barrier, see: http://git.kernel.org/linus/51aa32284958 Mike ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Bug 14354] Status of barrier requests in LVM and dm-crypt? 2009-10-13 14:49 ` Mike Snitzer @ 2009-10-15 19:10 ` Mikulas Patocka 0 siblings, 0 replies; 3+ messages in thread From: Mikulas Patocka @ 2009-10-15 19:10 UTC (permalink / raw) To: Mike Snitzer; +Cc: dm-devel, linux-ext4, Theodore Ts'o, bugzilla-daemon On Tue, 13 Oct 2009, Mike Snitzer wrote: > On Mon, Oct 12 2009 at 2:15pm -0400, > Theodore Ts'o <tytso@mit.edu> wrote: > > > Hi, I'm trying to track down a problem relating to ext4 problems, in > > kernel bugzilla 14354. Originally it was thought this was a regression > > 2.6.31->2.6.32-rc1 regression, but the Aneesh Kumar's report shows a > > very similar fsck transcript using a 2.6.30-1 kernel (which makes makes > > it unclear whether this is really a regression or not), and all three > > reports are tied together by the use of device-mapper. > > > > The fsck logs are consistent barriers being disabled. As I recall under > > some circumstances device mapper silently drops barrier requests --- I > > thought this was fixed for device mapper in some cases. What's the > > current status of barrier requests in device mapper? Are they > > faithfully passed for standard (non-RAID) LVM2 volumes? When was this > > changed? What about dm-crypto volumes? (One of the reports was with a > > dm-crypt volume from what I can tell.) > > Barrier infrastructure started to get added to the DM core in 2.6.30, see: > http://git.kernel.org/linus/af7e466a1ace > > But barriers were not enabled for all DM targets (_except_ dm-multipath) > until 2.6.31. So 2.6.31's dm-crypt does support barriers, see: > http://git.kernel.org/linus/647c7db14ef9 > > If the underlying device(s) support barriers DM should faithfully pass > them on (again except for dm-multipath). Also, requests with barriers > that result in -EOPNOTSUPP are retried without the barrier, see: > http://git.kernel.org/linus/51aa32284958 > > Mike Hi Device mapper never drops data in the barrier request. It converts barrier to non-barrier request or drops zero-sized barrier if the underlying device doesn't support barrier. Device mapped doesn't support barriers for dm-raid1 target (pending some other upstream patch that was ignored). If the underlying device doesn't support barriers or if dm-raid1 target is being used, device mapper returns success on barriers and it simply waits for the request queue to drain when accepting a barrier. The problems with "not flushing disk cache" only show up only if you pull the power plug out --- in this case, make sure that if you use dm-raid1, disk cache is turned off (hdparm -W 0). With other dm-targets, you can leave the disk cache on, because they accept barriers. If you see errors under normal operations, without power loss, then it has probably nothing to do with barriers at all. Mikulas ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-10-15 19:10 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-10-12 18:15 [Bug 14354] Status of barrier requests in LVM and dm-crypt? Theodore Ts'o 2009-10-13 14:49 ` Mike Snitzer 2009-10-15 19:10 ` Mikulas Patocka
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).