All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oleg Drokin <green@namesys.com>
To: Steve Pratt <slpratt@us.ibm.com>
Cc: reiserfs-list@namesys.com
Subject: Re: A couple of questions
Date: Thu, 16 May 2002 19:35:24 +0400	[thread overview]
Message-ID: <20020516193524.C2877@namesys.com> (raw)
In-Reply-To: <OF4598EC34.B53F2A48-ON85256BBB.00531156@pok.ibm.com>

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.

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

Basically it is (half pseudocode):

ifd=create_input_pipe(&pifd); // 
ofd=create_output_pipe(&pofd); // these 2 would return fds suitable for child
			       // and modify fds suitable for parent.
			       // in fact simple pipe(2) is what you need.
if (!fork()) {
	close(0);
	close(1);
	close(2);
	dup2(ifd,0);
	dup2(ofd,1);
	dup2(ofd,2);
	close(ofd);
	close(ifd);
	execl("/path/reiserfsck","reiserfsck","param1","param2",...);
}
close(ofd);
close(ifd);
read_len=read(pofd,&buffer, 100000); // nonblocking read in fact.
print_message(buffer, read_len); // Hans wants you to print mkreiserfs/reiserfsck banner on screen.
write(pifd, "Yes\n", 4);
read_len=read(pofd,&buffer, 100000); // nonblocking read in fact. probably in a loop
				     // Here you can even provide user with
print_message(buffer, read_len);     // progress information.

wait(&exitcode);
close(pifd);
close(pofd);
analyze_exitcode_and_notify_user(exitcode);

Bye,
    Oleg




  reply	other threads:[~2002-05-16 15:35 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-16 15:11 A couple of questions Steve Pratt
2002-05-16 15:35 ` Oleg Drokin [this message]
  -- 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 18:44 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
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020516193524.C2877@namesys.com \
    --to=green@namesys.com \
    --cc=reiserfs-list@namesys.com \
    --cc=slpratt@us.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.