All of lore.kernel.org
 help / color / mirror / Atom feed
* [Ocfs2-devel] [PATCH] Set return value to -EINVAL if superblock probe failed
@ 2009-10-12  9:16 Laszlo Attila Toth
  2009-10-29  6:03 ` Joel Becker
  0 siblings, 1 reply; 2+ messages in thread
From: Laszlo Attila Toth @ 2009-10-12  9:16 UTC (permalink / raw)
  To: ocfs2-devel

In case of non-modular kernels the root filesystem is mounted by trying
several filesystems. If ocfs2 is tried before the actual filesystem type,
such as squashfs, the mount is failed because ocfs2_fill_super's return
value was -EAGAIN and normally it should return with -EINVAL, which means
the filesystem is non-ocfs2.

Signed-off-by: Laszlo Attila Toth <panther@balabit.hu>
---
 fs/ocfs2/super.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c
index 476d488..1f506de 100644
--- a/fs/ocfs2/super.c
+++ b/fs/ocfs2/super.c
@@ -621,6 +621,7 @@ static int ocfs2_fill_super(struct super_block *sb, void *data, int silent)
 	/* probe for superblock */
 	status = ocfs2_sb_probe(sb, &bh, &sector_size);
 	if (status < 0) {
+		status = -EINVAL;
 		mlog(ML_ERROR, "superblock probe failed!\n");
 		goto read_super_error;
 	}
-- 
1.6.4.rc2

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

* [Ocfs2-devel] [PATCH] Set return value to -EINVAL if superblock probe failed
  2009-10-12  9:16 [Ocfs2-devel] [PATCH] Set return value to -EINVAL if superblock probe failed Laszlo Attila Toth
@ 2009-10-29  6:03 ` Joel Becker
  0 siblings, 0 replies; 2+ messages in thread
From: Joel Becker @ 2009-10-29  6:03 UTC (permalink / raw)
  To: ocfs2-devel

On Mon, Oct 12, 2009 at 11:16:44AM +0200, Laszlo Attila Toth wrote:
> In case of non-modular kernels the root filesystem is mounted by trying
> several filesystems. If ocfs2 is tried before the actual filesystem type,
> such as squashfs, the mount is failed because ocfs2_fill_super's return
> value was -EAGAIN and normally it should return with -EINVAL, which means
> the filesystem is non-ocfs2.

	ocfs2_sb_probe() shouldn't be returning -EAGAIN in the first
place.  I've done a different patch to the same effect, and it is now in
the fixes branch of ocfs2.git.

Joel

-- 

"What does it say about a society's priorities when the time you
 spend in meetings on Monday is greater than the total number of
 hours you spent sleeping over the weekend?"
	- Nat Friedman

Joel Becker
Principal Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127

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

end of thread, other threads:[~2009-10-29  6:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-12  9:16 [Ocfs2-devel] [PATCH] Set return value to -EINVAL if superblock probe failed Laszlo Attila Toth
2009-10-29  6:03 ` Joel Becker

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.