All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: A couple of questions
@ 2002-05-16 18:44 Steve Pratt
  2002-05-16 18:55 ` Oleg Drokin
  2002-05-16 20:33 ` Hans Reiser
  0 siblings, 2 replies; 50+ messages in thread
From: Steve Pratt @ 2002-05-16 18:44 UTC (permalink / raw)
  To: Oleg Drokin; +Cc: reiserfs-list


Oleg Drokin wrote:
>Hello!

>On Thu, May 16, 2002 at 10:11:37AM -0500, Steve Pratt wrote:
>> >> superblock. Neither 3.5 nor 3.6 superblock appear to have a label
field,
>> >> but mkfs has an option for it.
>> >Labels are supported in reiserfs v3.6 format. (2.4 supopr was merged
into
>> >2.4.19-pre3, if I remember correctly).
>> Ok, so it looks like I can use the option and if they have the right
kernel
>> code it will just work.

>In fact even kernel without "support" will work.
>Support is only means that the space in superblock is marked as used by
>label/uuid instead of being marked as "reserved".
>You cannot query uuid/label from withing the kernel, anyway.

Ok. This is fine.

>> >You can circumvient this by echo Yes | reiserfsck ...
>> >if you need.
>> Actually this is not trivial in fork/exec in C code.  Especially when I

>I think it is.

>> want to preserve the return code from the fsck.  If you know of a coding
>> trick to do this I would be interested.

(pseudocode removed) ...

Thanks! I have this working now.

One extra question on this.  I assume that if in Fix mode and errors are
encountered that fsck.resiserfs will prompt to fix each error and that
there is no way to have it answer 'Yes' automatically like the ext2 -y
option.

If not then I will probably have to take Jonathan Briggs suggestion of a
third process to answer 'Yes' repeatedly.

Steve





^ permalink raw reply	[flat|nested] 50+ messages in thread
* A couple of questions
@ 2010-05-27 13:39 Paul Millar
  2010-05-27 14:56 ` Hubert Kario
  2010-05-27 16:00 ` Chris Mason
  0 siblings, 2 replies; 50+ messages in thread
From: Paul Millar @ 2010-05-27 13:39 UTC (permalink / raw)
  To: linux-btrfs

Hi,

I've been looking at Btrfs and have a couple of naive questions that don't 
seem to be answered on the wiki or in the articles I've read on the 
filesystem.


First: discovering a file's checksum value.

Here's the scenario: software is writing some data as a fresh file.  This 
software happens to know (a priori) the checksum of this data; for example, a 
storage server receives the file's data and checksum independently.

I've some confidence that, once the data is stored in btrfs, any corruption 
(from the storage fabric) will be spotted; however, the data may have became 
corrupt before being stored (e.g., from the network).  To catch this, the 
checksum of the stored data needs to be calculated and checked.

One approach is to calculate the checksum (in user-space) after the data is 
stored.  This adds extra IO- and CPU-load and there's also the possibility of 
false-negative results due to the filesystem cache (although btrfs may remove 
this risk).

Another approach would be to ask btrfs for the checksum.  It seems that it's 
possible to combine multiple CRC-32C values to figure out the checksum of the 
combined data [e.g., zlib's crc32_combine() function].  So, obtaining a file's 
checksum might be a light-weight operation.

Yet another possibility would be to push the desired checksum value (via 
fcntl?) and have btrfs compare the desired checksum with the file's actual 
checksum on close(2), failing that call if the checksums don't match.

Would any of this be possible (without an awful lot of work)?



Second: adding support for Adler32?

Looking at the unstable git repo, it looks like there's currently support for 
only the CRC-32C checksum algorithm.  Is this correct?  If so, is anyone 
working on adding support for Adler32?

Cheers,

Paul.
(ps, please keep me CC-ed in on replies)

^ permalink raw reply	[flat|nested] 50+ messages in thread
* A couple of questions
@ 2005-04-18 11:51 Imre Simon
  2005-04-18 15:31 ` Linus Torvalds
  0 siblings, 1 reply; 50+ messages in thread
From: Imre Simon @ 2005-04-18 11:51 UTC (permalink / raw)
  To: git

How will git handle a corrupted (git) file system?

For instance, what can be done if objects/xy/z{38} does not pass the
simple consistency test, i.e. if the file's sha1 hash is not xyz{38}?
This might be a serious problem because, in general, one cannot
reconstruct the contents of file objects/xy/z{38} from its name
xyz{38}.

Another problem might come up if the file does pass the simple
consistency test but the file's contents is not a valid git file,
i.e. something that

  (*) successfully inflates to a stream of bytes that forms a sequence of
  <ascii tag without space> + <space> + <ascii decimal size> +
  <byte\0> + <binary object data>.

Are there enough internal redundancies in git to allow fixing at least
some corrupted file systems? Shouldn't there be some?

Another related observation is that git is not really based on a 160 bit
hashing scheme. Indeed, only files that satisfy the above condition
(*) are allowed and this most certainly reduces the valid range of the
hashing function. I do not think that this will be a problem, but it
doesn't hurt to point this out once.

Cheers,

Imre Simon


^ permalink raw reply	[flat|nested] 50+ messages in thread
* RE: A couple of questions
@ 2002-05-17 15:27 Steve Pratt
  0 siblings, 0 replies; 50+ messages in thread
From: Steve Pratt @ 2002-05-17 15:27 UTC (permalink / raw)
  To: reiserfs-list


There have been many valid point raised here about the ability of a fsck
program to correctly fix all errors without user input.   Based on a quick
scan of the reiser fsck code, it appears to have relatively few user
prompts (except for the rebuild_bs path which I am excluding from this
discussion).   For keeping FSIM behaviors consistent in the EVMS interface,
I will implement the call to reiser fsck with a auto response of a carriage
return to accept the default action of the user prompt.  I will preface the
running of fsck in other than read-only mode with a warning that this will
occur and in the case where this is unacceptable to an experienced user, he
can still execute the fsck from the command line.  I will also capture all
of the output from fsck (including the banner/credits) and display to the
user.

Now, on to expand and shrink......

Steve

EVMS Development - http://www.sf.net/projects/evms
Linux Technology Center - IBM Corporation
(512) 838-9763  EMAIL: SLPratt@US.IBM.COM



^ permalink raw reply	[flat|nested] 50+ messages in thread
* RE: A couple of questions
@ 2002-05-17 13:11 berthiaume_wayne
  2002-05-17 16:03 ` Kuba Ober
  0 siblings, 1 reply; 50+ messages in thread
From: berthiaume_wayne @ 2002-05-17 13:11 UTC (permalink / raw)
  To: kuba; +Cc: reiserfs-list

	Kuba, I guess the question that should be posed this way: What is
the downside of not asking the user and just fixing what can be fixed? Is
there a potential for unrepairable damage if you were to fix blindly without
"user" intervention?

-----Original Message-----
From: Kuba Ober [mailto:kuba@mareimbrium.org]
Sent: Thursday, May 16, 2002 5:24 PM
To: reiserfs-list@namesys.com
Subject: Re: [reiserfs-list] A couple of questions


> >One extra question on this.  I assume that if in Fix mode and errors are
> >encountered that fsck.resiserfs will prompt to fix each error and that
> >there is no way to have it answer 'Yes' automatically like the ext2 -y
> >option.
> >
> >If not then I will probably have to take Jonathan Briggs suggestion of a
> >third process to answer 'Yes' repeatedly.
> >
> >Steve
>
> Why in the world do you want to run fsck without running it manually,
> and passing all information to the user?

What I'm thinking of is this:
1. If a filesystem is really too borked for fsck to recover useful stuff, it

should be left alone. Either fsck is able to help or not. No need to ask 
user, fsck has more data to determine whether the fs makes a scant of sense,

or if it has been messed up too much.
2. If we run fsck, we want to recover as much data as possible. That's what 
lost+found directory is for -- stuff that is not exactly clean for use, but 
may nevertheless be useful, gets hooked there.

Why on earth does a filesystem check & recovery program need to ask
questions 
to the user, which most users w/o intimate filesystem knowledge won't be
able 
to answer at all? Looking at this list, what people want is to get their
data 
back, as much as possible. They never want to get less than that. Why bother

asking?

That's one thing. Another thing is making fsck work on broken media, since 
that is what many unsuspecting users actually do. It should simply disregard

read errors and try using whatever data there is in ok-read blocks.

I don't think that asking too many questions is worth it. He who runs fsck
in 
"fix" mode wants his data back (whatever is left of it). Certain things,
like 
recovering the deleted files, may be worth specifying as options, but
typical 
recovery stuff should be w/o questions in my opinion. At least that's what 
I'd expect all fsck's to do.

Cheers, Kuba

^ permalink raw reply	[flat|nested] 50+ messages in thread
* Re: A couple of questions
@ 2002-05-16 18:48 Steve Pratt
  0 siblings, 0 replies; 50+ messages in thread
From: Steve Pratt @ 2002-05-16 18:48 UTC (permalink / raw)
  To: Jonathan Briggs; +Cc: reiserfs-list



Jonathan Briggs wrote:
>On Thu, 2002-05-16 at 09:11, Steve Pratt wrote:

>> >You can circumvient this by echo Yes | reiserfsck ...
>> >if you need.
>>
>> Actually this is not trivial in fork/exec in C code.  Especially when I
>> want to preserve the return code from the fsck.  If you know of a coding
>> trick to do this I would be interested.

>This is not too hard.  I would do two forks, so that the main process
>does not get hung up writing Yes's.  So:

>Main Process:
>Create a pipe with pipe()
>Fork off your fsck.reiserfs and record the pid returned from fork.
>Fork off your Yes writer and record the pid returned from fork.
>Wait for your Yes writer with waitpid.
>Wait for your fsck with waitpid and collect the status.

>fsck Child Process
>Call dup2 to change standard input to your pipe output
>Close the original pipe input file descriptor.
>Close the original pipe output file descriptor.
>Exec fsck.reiserfs

>Yes writer Child Process:
>Close the pipe output file descriptor.
>Loop writing Yes into your pipe input.
>Should not need to worry about exiting, this process should get a
>SIGPIPE when other process exits.

Thanks, it looks like I will need to do this..

Steve




^ permalink raw reply	[flat|nested] 50+ messages in thread
* Re: A couple of questions
@ 2002-05-16 15:11 Steve Pratt
  2002-05-16 15:35 ` Oleg Drokin
  0 siblings, 1 reply; 50+ messages in thread
From: Steve Pratt @ 2002-05-16 15:11 UTC (permalink / raw)
  To: Oleg Drokin; +Cc: reiserfs-list


Oleg Drokin wrote:
>Hello!

>On Wed, May 15, 2002 at 04:22:22PM -0500, Steve Pratt wrote:

>> A couple of questions about the ReiserFS utilities.  First, does
ReiserFS
>> support labels or not?  FAQ says no and refers to lack of space in the
3.5
>> superblock. Neither 3.5 nor 3.6 superblock appear to have a label field,
>> but mkfs has an option for it.

>Labels are supported in reiserfs v3.6 format. (2.4 supopr was merged into
>2.4.19-pre3, if I remember correctly).

Ok, so it looks like I can use the option and if they have the right kernel
code it will just work.

>> Second, what is the option to keep fsck from prompting for 'Yes' when
>> running.  I need to exec this without additional input.  Seems like
quiet
>> should do it, but it doesn't.

>Hans has a decision that this should not be done for now because
>reiserfsprogs are in active bugfixing stage.

Bummer.

>You can circumvient this by echo Yes | reiserfsck ...
>if you need.

Actually this is not trivial in fork/exec in C code.  Especially when I
want to preserve the return code from the fsck.  If you know of a coding
trick to do this I would be interested.

Steve





^ permalink raw reply	[flat|nested] 50+ messages in thread
* Re: A couple of questions
@ 2002-05-16 14:52 Steve Pratt
  2002-05-16 15:13 ` Hans Reiser
  0 siblings, 1 reply; 50+ messages in thread
From: Steve Pratt @ 2002-05-16 14:52 UTC (permalink / raw)
  To: Hans Reiser; +Cc: Oleg Drokin, reiserfs-list


Hans Reiser wrote:
>Oleg Drokin wrote:

>>Hello!
>>
>>On Thu, May 16, 2002 at 01:42:48PM +0400, Hans Reiser wrote:
>>
>>
>>
>>>>>Second, what is the option to keep fsck from prompting for 'Yes' when
>>>>>running.  I need to exec this without additional input.  Seems like
quiet
>>>>>should do it, but it doesn't.
>>>>>
>>>>>
>>>>Hans has a decision that this should not be done for now because
>>>>reiserfsprogs are in active bugfixing stage.
>>>>
>>>>
>>>
>>>?
>>>I don't understand this.:-/
>>>
>>>
>>
>>You have said "We do not trust reiserfsck to be run automatically without
>>user confirmation"
>>
>>Bye,
>>    Oleg
>>
>>
>Ah, now I remember the conversation.  Yes, if we put the option in,
>someone will get the bright idea to run it at every boot (and they might
>be a distro or appliance vendor:-/), and fsck is not as reliable as
>journaling so this should not be done.

>So, why do you want to exec it without additional input?

Because I have already prompted for input from the EVMS interface.  The
FSIMs in EVMS provide for EVMS to coordinate actions with the file systems
such are shrinking the filesystem before shrinking the volume.  We also
provide interfaces for mkfs, fsck and defrag (if supported by the file
system).  So the FSIM prompts for all of the options to be passed to the
file system utility and then invokes it.  In the case of fsck I have
already prompted for all the options and the user is explicitly asking for
fsck on this volume.  Since the prompt is output on stdout it may not be
visible to a GUI user.

Steve




Hans







^ permalink raw reply	[flat|nested] 50+ messages in thread
* A couple of questions
@ 2002-05-15 21:22 Steve Pratt
  2002-05-16  5:20 ` Oleg Drokin
  0 siblings, 1 reply; 50+ messages in thread
From: Steve Pratt @ 2002-05-15 21:22 UTC (permalink / raw)
  To: reiserfs-list

A couple of questions about the ReiserFS utilities.  First, does ReiserFS
support labels or not?  FAQ says no and refers to lack of space in the 3.5
superblock. Neither 3.5 nor 3.6 superblock appear to have a label field,
but mkfs has an option for it.

Second, what is the option to keep fsck from prompting for 'Yes' when
running.  I need to exec this without additional input.  Seems like quiet
should do it, but it doesn't.

Steve

EVMS Development - http://www.sf.net/projects/evms
Linux Technology Center - IBM Corporation
(512) 838-9763  EMAIL: SLPratt@US.IBM.COM



^ permalink raw reply	[flat|nested] 50+ messages in thread
* A couple of questions
@ 2001-10-10 11:28 Adil EL YOUSSEFI
  2001-10-10 12:11 ` David Woodhouse
  0 siblings, 1 reply; 50+ messages in thread
From: Adil EL YOUSSEFI @ 2001-10-10 11:28 UTC (permalink / raw)
  To: linux-mtd

Hi everybody,

 I have some questions reguarding JFFS2 :

-> Under what license it is released. My boss wants to
 know if he would have to pay in order to put JFFS2 in
our product.

-> We are using a flash device with different sector
sizes ( 1*32k, 2*16k,1*64k and the others are 128k ),
What size should the JFFS2 reserved sectors have then
?

-> If JFFS2 is used without enabling compression, will
there still be corner cases in GC requiring 5 reserved
sectors and not 2. 

-> Why can't JFFS2 be used on Compact flashes ? 

Thanks,




__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com

^ permalink raw reply	[flat|nested] 50+ messages in thread
* A couple of questions
@ 1999-03-02 13:11 Neil Booth
  1999-03-15 18:58 ` Stephen C. Tweedie
  0 siblings, 1 reply; 50+ messages in thread
From: Neil Booth @ 1999-03-02 13:11 UTC (permalink / raw)
  To: linux-mm

I have a couple of questions about do_wp_page; I hope they're welcome
here.

1) do_wp_page has most execution paths doing an unlock_kernel() but
there are a couple that don't. Why isn't this inconsistent? e.g. any of
the branches that call end_wp_page do not unlock the kernel. What am I
missing? Is it that these branches only happen if we slept while getting
the free page, and sleeping always unlocks the kernel?

2) The last 2 of the 3 branches to end_wp_page seem to me to be
impossible code paths.

	if (!pte_present(pte))
		goto end_wp_page;
	if (pte_write(pte))
		goto end_wp_page;

At entry, pte (= *page_table) is present and not writable as this is the
only way do_wp_page gets called from handle_pte_fault (and we hold the
kernel lock so nothing else can change *page_table). Being a local
variable, it contents cannot change, so why these 2 tests?

Cheers,

Neil.
--
To unsubscribe, send a message with 'unsubscribe linux-mm my@address'
in the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://humbolt.geo.uu.nl/Linux-MM/

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

end of thread, other threads:[~2010-06-04  1:17 UTC | newest]

Thread overview: 50+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-05-16 18:44 A couple of questions Steve Pratt
2002-05-16 18:55 ` Oleg Drokin
2002-05-16 20:33 ` Hans Reiser
2002-05-16 21:23   ` Kuba Ober
2002-05-16 21:44     ` Lehmann 
2002-05-16 21:44     ` Lehmann 
2002-05-16 23:57       ` Hans Reiser
2002-05-17  0:45         ` Philipp Gühring
2002-05-17  1:06           ` Manuel Krause
2002-05-17 15:21           ` Kuba Ober
2002-05-17  0:17       ` Manuel Krause
2002-05-17 15:04       ` Kuba Ober
2002-05-18 20:40         ` Hans Reiser
2002-05-17 15:05       ` Kuba Ober
2002-05-17 13:10     ` Valdis.Kletnieks
2002-05-17 15:35       ` Kuba Ober
  -- strict thread matches above, loose matches on Subject: below --
2010-05-27 13:39 Paul Millar
2010-05-27 14:56 ` Hubert Kario
2010-05-31 17:59   ` Paul Millar
2010-06-02 16:19     ` Hubert Kario
2010-05-27 16:00 ` Chris Mason
2010-05-31 18:06   ` Paul Millar
2010-05-31 20:33     ` Mike Fedyk
2010-06-02 11:56       ` Paul Millar
2010-06-01 13:39     ` Martin K. Petersen
2010-06-02 13:40       ` Paul Millar
2010-06-04  1:17         ` Martin K. Petersen
2005-04-18 11:51 Imre Simon
2005-04-18 15:31 ` Linus Torvalds
2005-04-18 16:23   ` Paul Jackson
2002-05-17 15:27 Steve Pratt
2002-05-17 13:11 berthiaume_wayne
2002-05-17 16:03 ` Kuba Ober
2002-05-16 18:48 Steve Pratt
2002-05-16 15:11 Steve Pratt
2002-05-16 15:35 ` Oleg Drokin
2002-05-16 14:52 Steve Pratt
2002-05-16 15:13 ` Hans Reiser
2002-05-15 21:22 Steve Pratt
2002-05-16  5:20 ` Oleg Drokin
2002-05-16  9:42   ` Hans Reiser
2002-05-16 11:40     ` Oleg Drokin
2002-05-16 11:54       ` Hans Reiser
2001-10-10 11:28 Adil EL YOUSSEFI
2001-10-10 12:11 ` David Woodhouse
1999-03-02 13:11 Neil Booth
1999-03-15 18:58 ` Stephen C. Tweedie
1999-03-15 22:46   ` neil
1999-03-16 12:22     ` Stephen C. Tweedie
1999-03-16  2:11   ` Andrea Arcangeli

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.