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: <46696CE7.3060206@rtr.ca>
Date:	Fri, 08 Jun 2007 10:51:19 -0400
From:	Mark Lord <lkml@....ca>
To:	Andrew Morton <akpm@...ux-foundation.org>
Cc:	Chuck Ebbert <cebbert@...hat.com>,
	Stephen Tweedie <sct@...hat.com>,
	Theodore Ts'o <tytso@....edu>,
	Linux Kernel <linux-kernel@...r.kernel.org>
Subject: Re: ext3fs: umount+sync not enough to guarantee metadata-on-disk

Andrew Morton wrote:
> On Thu, 07 Jun 2007 17:38:54 -0400
> Mark Lord <lkml@....ca> wrote:
> 
>> Andrew Morton wrote:
>>> On Thu, 07 Jun 2007 12:11:58 -0400
>>> Chuck Ebbert <cebbert@...hat.com> wrote:
>>>
>>>> On 06/07/2007 11:41 AM, Andrew Morton wrote:
>>>>>>    mount /var/lib/mythtv -oremount,ro
>>>>>>    sync
>>>>>>    umount /var/lib/mythtv
>>>>> Did this succeed?  If the application is still truncating that file, the
>>>>> umount should have failed.
>>>> Shouldn't sync should wait for truncate to finish?
>>> I can't think of anything in there at present which would cause that to
>>> happen, and it's not immediately obvious how we _could_ make it happen - we
>>> have an inode which potentially has no dirty pages and which is itself
>>> clean.  The truncate can span multiple journal commits, so forcing a
>>> journal commit in sync() won't necessarily block behind the truncate.
>>>
>>> I guess we could ask sync to speculatively take and release every inode's
>>> i_mutex or something.  But even that would involve quite some hoop-jumping
>>> due to those infuriating spinlock-protected list_heads on the superblock.
>>>
>>> hmm.
>> Yeah, I really don't know what to do with this either.
>> We have to have a bounds on how long we wait at shutdown,
>> but there doesn't seem to be an easy way to get notified
>> once a filesystem becomes idle (?).
>>
>> I suppose I could have the script loop on /proc/interrupts until
>> it sees the disk activity has tapered off..
>>
> 
> I don't recall clarity on this question: did the umount fail?
> 
> Because it should have, in which case your script can poll that.

I haven't had the opportunity to instrument/retest that part,
but would it really make any difference?

The process is already a Zombie at this point, existing only
because it was killed during a syscall and seems to have gotten
stuck there.  So it won't be closing anything unless that has
already happened during the conversion to Zombie (?).

But yeah, I'll get back here again once I see if the remount
and umount work or not.

Cheers
-
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