Andriy Gapon | 1 Apr 19:38 2010
Picon

Re: g_vfs_open and bread(devvp, ...)


Some bad news.
Apparently I missed the fact that in some places bo_bsize is used as sectorsize
value of underlying provider.  That is, there is code that assumes that devvp's
bo_bsize == sectorsize.

One such place is vnode_pager_generic_getpages() in sys/vm/vnode_pager.c.
That code directly calls bstrategy() on bufobj of devvp and because of that it
wants to round up read size to media sectorsize (there would be a KASSERT panic in
GEOM if I/O size is not multiple of sectorsize).
Thus the code needs to know sectorsize.

The other possible place is ffs_rawread.

I am not sure how to get sectorsize value in those places in a nice way, i.e.
without kludges or violating logical layering.
I.e. I could access bo_private->provider->sectorsize, but that seems to be too
hack-ish.
If anyone knows of a proper way to do this, please let me know.

For now I am thinking about resorting to a different, slightly less kludgy (IMO)
approach.
Leave devvp's bo_bsize to mean provider's sectorsize, but instead in getblk()
account for devvp's blkno being in units of DEV_BSIZE:
--- a/sys/kern/vfs_bio.c
+++ b/sys/kern/vfs_bio.c
 <at>  <at>  -2700,7 +2700,7  <at>  <at> 
 		 */
 		if (flags & GB_NOCREAT)
 			return NULL;
(Continue reading)

Jaakko Heinonen | 5 Apr 11:26 2010
Picon

GEOM class unload deadlock


Hi,

Below is  a patch to fix a possible deadlock between g_unload_class()
and withering. Probably the easiest way to reproduce the deadlock is to
load geom_mbr.ko module and then try to unload it.

Some details are explained this message:

	http://docs.freebsd.org/cgi/mid.cgi?20081216210311.GA5229

---

Fix deadlock between GEOM class unloading and withering. Withering can't
proceed while g_unload_class() blocks the event thread. Fix this by
queuing the unload event repeatedly until withering has finished.

PR:		kern/139847

%%%
Index: sys/geom/geom_subr.c
===================================================================
--- sys/geom/geom_subr.c	(revision 206155)
+++ sys/geom/geom_subr.c	(working copy)
 <at>  <at>  -146,17 +146,8  <at>  <at>  g_unload_class(void *arg, int flag)
 	G_VALID_CLASS(mp);
 	g_trace(G_T_TOPOLOGY, "g_unload_class(%s)", mp->name);

-	/*
-	 * We allow unloading if we have no geoms, or a class
(Continue reading)

FreeBSD bugmaster | 5 Apr 13:07 2010
Picon

Current problem reports assigned to freebsd-geom <at> FreeBSD.org

Note: to view an individual PR, use:
  http://www.freebsd.org/cgi/query-pr.cgi?pr=(number).

The following is a listing of current problems submitted by FreeBSD users.
These represent problem reports covering all versions including
experimental development code and obsolete releases.

S Tracker      Resp.      Description
--------------------------------------------------------------------------------
o kern/145042  geom       [geom] System stops booting after printing message "GE
o kern/144962  geom       [geom] panic when accessing GPT disk with a large numb
o bin/144943   geom       [geom] gconcat(8) randomly "loses" all knowledge of JB
o kern/144905  geom       [geom][gpart] panic in gpart_ctlreq when unplugging ca
o kern/144732  geom       [geom] [patch] geom_cache erroneously decodes its on-d
o bin/144521   geom       geom(1) tool parsing non-subclass command broken
o kern/143455  geom       gstripe(8) in RELENG_8 (31st Jan 2010) broken
o kern/142563  geom       [geom] [hang] ioctl freeze in zpool
f kern/142365  geom       [geom] FreeBSD RAID1 (gmirror) is much slower than Lin
o kern/141740  geom       [geom] gjournal(8): g_journal_destroy concurrent error
o kern/140352  geom       [geom] gjournal + glabel not working
o kern/139847  geom       [geom_mbr] [patch] load/unload causes system to hang
o kern/135898  geom       [geom] Severe filesystem corruption - large files or l
o kern/134922  geom       [gmirror] [panic] kernel panic when use fdisk on disk 
o kern/134113  geom       [geli] Problem setting secondary GELI key
o kern/134044  geom       [geom] gmirror(8) overwrites fs with stale data from r
o kern/133931  geom       [geli] [request] intentionally wrong password to destr
o bin/132845   geom       [geom] [patch] ggated(8) does not close files opened a
o kern/132273  geom       glabel(8): [patch] failing on journaled partition
f kern/132242  geom       [gmirror] gmirror.ko fails to fully initialize
o kern/131353  geom       [geom] gjournal(8) kernel lock
(Continue reading)

linimon | 5 Apr 23:18 2010
Picon

Re: kern/145414: [geom] Problem with Geom/Gmirror

Old Synopsis: Problem with Geom/Gmirror
New Synopsis: [geom] Problem with Geom/Gmirror

Responsible-Changed-From-To: freebsd-amd64-≥freebsd-geom
Responsible-Changed-By: linimon
Responsible-Changed-When: Mon Apr 5 21:17:42 UTC 2010
Responsible-Changed-Why: 
reclassify

http://www.freebsd.org/cgi/query-pr.cgi?pr=145414
Garrett Cooper | 5 Apr 23:40 2010
Picon

Re: amd64/145414: Problem with Geom/Gmirror

The following reply was made to PR kern/145414; it has been noted by GNATS.

From: Garrett Cooper <yanefbsd <at> gmail.com>
To: Eduardo Orige <eduardo.orige <at> gmail.com>
Cc: bug-followup <at> freebsd.org
Subject: Re: amd64/145414: Problem with Geom/Gmirror
Date: Mon, 5 Apr 2010 14:37:36 -0700

 --0016362846fa34955804838423c9
 Content-Type: text/plain; charset=ISO-8859-1
 Content-Transfer-Encoding: quoted-printable
 
 Em Seg, 2010-04-05 =E0s 13:30 -0700, Garrett Cooper escreveu:
 > On Mon, Apr 5, 2010 at 1:20 PM, Eduardo Orige <eduardo.orige <at> gmail.com> w=
 rote:
 > > Em Seg, 2010-04-05 =E0s 12:29 -0700, Garrett Cooper escreveu:
 > >> On Mon, Apr 5, 2010 at 11:24 AM, Eduardo Orige <eduardo.orige <at> gmail.co=
 m> wrote:
 > >> >
 > >> >>Number: =A0 =A0 =A0 =A0 145414
 > >> >>Category: =A0 =A0 =A0 amd64
 > >> >>Synopsis: =A0 =A0 =A0 Problem with Geom/Gmirror
 > >> >>Confidential: =A0 no
 > >> >>Severity: =A0 =A0 =A0 critical
 > >> >>Priority: =A0 =A0 =A0 medium
 > >> >>Responsible: =A0 =A0freebsd-amd64
 > >> >>State: =A0 =A0 =A0 =A0 =A0open
 > >> >>Quarter:
 > >> >>Keywords:
 > >> >>Date-Required:
(Continue reading)

Eduardo Orige | 6 Apr 03:20 2010
Picon

Re: amd64/145414: Problem with Geom/Gmirror

The following reply was made to PR kern/145414; it has been noted by GNATS.

From: Eduardo Orige <eduardo.orige <at> gmail.com>
To: bug-followup <at> freebsd.org
Cc:  
Subject: Re: amd64/145414: Problem with Geom/Gmirror
Date: Mon, 05 Apr 2010 21:45:03 -0300

 Em Seg, 2010-04-05 às 14:37 -0700, Garrett Cooper escreveu:
 > Em Seg, 2010-04-05 às 13:30 -0700, Garrett Cooper escreveu:
 > > On Mon, Apr 5, 2010 at 1:20 PM, Eduardo Orige <eduardo.orige <at> gmail.com> wrote:
 > > > Em Seg, 2010-04-05 às 12:29 -0700, Garrett Cooper escreveu:
 > > >> On Mon, Apr 5, 2010 at 11:24 AM, Eduardo Orige <eduardo.orige <at> gmail.com> wrote:
 > > >> >
 > > >> >>Number:         145414
 > > >> >>Category:       amd64
 > > >> >>Synopsis:       Problem with Geom/Gmirror
 > > >> >>Confidential:   no
 > > >> >>Severity:       critical
 > > >> >>Priority:       medium
 > > >> >>Responsible:    freebsd-amd64
 > > >> >>State:          open
 > > >> >>Quarter:
 > > >> >>Keywords:
 > > >> >>Date-Required:
 > > >> >>Class:          sw-bug
 > > >> >>Submitter-Id:   current-users
 > > >> >>Arrival-Date:   Mon Apr 05 18:30:08 UTC 2010
 > > >> >>Closed-Date:
 > > >> >>Last-Modified:
(Continue reading)

Jaakko Heinonen | 6 Apr 06:10 2010
Picon

Re: kern/145414: [geom] Problem with Geom/Gmirror

The following reply was made to PR kern/145414; it has been noted by GNATS.

From: Jaakko Heinonen <jh <at> FreeBSD.org>
To: eduardo.orige <at> gmail.com
Cc: Garrett Cooper <yanefbsd <at> gmail.com>, bug-followup <at> FreeBSD.org
Subject: Re: kern/145414: [geom] Problem with Geom/Gmirror
Date: Tue, 6 Apr 2010 07:07:04 +0300

 Please see PR kern/104389. This is likely a duplicate of it.

 -- 
 Jaakko
Andrey V. Elsukov | 6 Apr 14:34 2010
Picon

[patch] allow undo creating BSD and VTOC8 schemes with gpart(8)

Hi, All and Marcel,

I found that gpart(8) doesn't support undo for "create"
command for BSD and VTOC8 schemes, because they have internal
entries in table. I added this support and it seems it works.
So my question addressed to Marcel: is it correct? :)

-- 
WBR, Andrey V. Elsukov
Index: g_part.c
===================================================================
--- g_part.c	(revision 204945)
+++ g_part.c	(working copy)
 <at>  <at>  -1065,12 +1174,18  <at>  <at>  g_part_ctl_undo(struct gctl_req *req, struct g_par
 	    table->gpt_created) ? 1 : 0;

 	if (reprobe) {
-		if (!LIST_EMPTY(&table->gpt_entry)) {
+		LIST_FOREACH(entry, &table->gpt_entry, gpe_entry) {
+			if (entry->gpe_internal)
+				continue;
 			error = EBUSY;
 			goto fail;
 		}
 		error = g_part_probe(gp, cp, table->gpt_depth);
 		if (error) {
+			while ((entry = LIST_FIRST(&table->gpt_entry)) != NULL) {
+				LIST_REMOVE(entry, gpe_entry);
(Continue reading)

Eduardo Orige | 6 Apr 15:00 2010
Picon

Re: amd64/145414: Problem with Geom/Gmirror

The following reply was made to PR kern/145414; it has been noted by GNATS.

From: Eduardo Orige <eduardo.orige <at> gmail.com>
To: Bug-followup <bug-followup <at> freebsd.org>
Cc:  
Subject: Re: amd64/145414: Problem with Geom/Gmirror
Date: Tue, 06 Apr 2010 09:54:55 -0300

 Em Seg, 2010-04-05 às 18:10 -0700, Garrett Cooper escreveu:
 > On Mon, Apr 5, 2010 at 5:44 PM, Eduardo Orige <eduardo.orige <at> gmail.com> wrote:
 > > Em Seg, 2010-04-05 às 14:37 -0700, Garrett Cooper escreveu:
 > >> Em Seg, 2010-04-05 às 13:30 -0700, Garrett Cooper escreveu:
 > >> > On Mon, Apr 5, 2010 at 1:20 PM, Eduardo Orige <eduardo.orige <at> gmail.com> wrote:
 > >> > > Em Seg, 2010-04-05 às 12:29 -0700, Garrett Cooper escreveu:
 > >> > >> On Mon, Apr 5, 2010 at 11:24 AM, Eduardo Orige <eduardo.orige <at> gmail.com> wrote:
 > >> > >> >
 > >> > >> >>Number:         145414
 > >> > >> >>Category:       amd64
 > >> > >> >>Synopsis:       Problem with Geom/Gmirror
 > >> > >> >>Confidential:   no
 > >> > >> >>Severity:       critical
 > >> > >> >>Priority:       medium
 > >> > >> >>Responsible:    freebsd-amd64
 > >> > >> >>State:          open
 > >> > >> >>Quarter:
 > >> > >> >>Keywords:
 > >> > >> >>Date-Required:
 > >> > >> >>Class:          sw-bug
 > >> > >> >>Submitter-Id:   current-users
 > >> > >> >>Arrival-Date:   Mon Apr 05 18:30:08 UTC 2010
(Continue reading)

jh | 6 Apr 19:23 2010
Picon

Re: kern/145414: [geom] Problem with Geom/Gmirror

Synopsis: [geom] Problem with Geom/Gmirror

State-Changed-From-To: open->closed
State-Changed-By: jh
State-Changed-When: Tue Apr 6 17:23:49 UTC 2010
State-Changed-Why: 
Duplicate of kern/104389.

http://www.freebsd.org/cgi/query-pr.cgi?pr=145414

Gmane