public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
From: fabbione@sourceware.org
To: cluster-cvs@sources.redhat.com, cluster-devel@redhat.com
Subject: Cluster Project branch, master, updated. gfs-kernel_0_1_22-151-g9fecacd
Date: Wed, 09 Apr 2008 14:33:00 -0000	[thread overview]
Message-ID: <20080409143304.25016.qmail@sourceware.org> (raw)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Cluster Project".

http://sources.redhat.com/git/gitweb.cgi?p=cluster.git;a=commitdiff;h=9fecacd358dba0a191f29e7932281fc862a6ec33

The branch, master has been updated
       via  9fecacd358dba0a191f29e7932281fc862a6ec33 (commit)
      from  4bcb36b4ab8b063af84aa6a55278c74de44b16b8 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 9fecacd358dba0a191f29e7932281fc862a6ec33
Author: Fabio M. Di Nitto <fabbione@fabbione.net>
Date:   Wed Apr 9 10:10:28 2008 +0200

    [KERNEL] Update modules to build with 2.6.25
    
    Update clean target to cope with a new file that Kbuild creates at build time.
    
    Bump minimum kernel requirements to 2.6.25.
    
    Port modules to new kobj api.
    
    Signed-off-by: Fabio M. Di Nitto <fabbione@fabbione.net>

-----------------------------------------------------------------------

Summary of changes:
 configure                |    2 +-
 gfs-kernel/src/gfs/sys.c |   25 +++++++++++--------------
 gnbd-kernel/src/gnbd.c   |   18 +++++++-----------
 make/clean.mk            |    2 +-
 4 files changed, 20 insertions(+), 27 deletions(-)

diff --git a/configure b/configure
index 451c777..1b65c70 100755
--- a/configure
+++ b/configure
@@ -28,7 +28,7 @@ my $ret = 0;
 
 # this should be only the major version without the extra version 
 # eg. only the first 3 digits
-my $required_kernelversion = '2.6.24';
+my $required_kernelversion = '2.6.25';
 
 my %options = (
 	help => \$help,
diff --git a/gfs-kernel/src/gfs/sys.c b/gfs-kernel/src/gfs/sys.c
index de64a3f..8afbebd 100644
--- a/gfs-kernel/src/gfs/sys.c
+++ b/gfs-kernel/src/gfs/sys.c
@@ -85,24 +85,20 @@ static struct kobj_type gfs_ktype = {
 	.sysfs_ops     = &gfs_attr_ops,
 };
 
-static struct kset gfs_kset = {
-	.ktype  = &gfs_ktype,
-};
+static struct kset *gfs_kset;
 
 int gfs_sys_fs_add(struct gfs_sbd *sdp)
 {
 	int error;
 
-	sdp->sd_kobj.kset = &gfs_kset;
-	sdp->sd_kobj.ktype = &gfs_ktype;
+	sdp->sd_kobj.kset = gfs_kset;
 
-	error = kobject_set_name(&sdp->sd_kobj, "%s", sdp->sd_table_name);
+	error = kobject_init_and_add(&sdp->sd_kobj, &gfs_ktype, NULL,
+				     "%s", sdp->sd_table_name);
 	if (error)
 		goto fail;
 
-	error = kobject_register(&sdp->sd_kobj);
-	if (error)
-		goto fail;
+	kobject_uevent(&sdp->sd_kobj, KOBJ_ADD);
 
 	return 0;
 
@@ -112,20 +108,21 @@ int gfs_sys_fs_add(struct gfs_sbd *sdp)
 
 void gfs_sys_fs_del(struct gfs_sbd *sdp)
 {
-	kobject_unregister(&sdp->sd_kobj);
+	kobject_put(&sdp->sd_kobj);
 }
 
 int gfs_sys_init(void)
 {
 	gfs_sys_margs = NULL;
 	spin_lock_init(&gfs_sys_margs_lock);
-	kobject_set_name(&gfs_kset.kobj, "gfs");
-	kobj_set_kset_s(&gfs_kset, fs_subsys);
-	return kset_register(&gfs_kset);
+	gfs_kset = kset_create_and_add("gfs", NULL, fs_kobj);
+	if (!gfs_kset)
+		return -ENOMEM;
+	return 0;
 }
 
 void gfs_sys_uninit(void)
 {
 	kfree(gfs_sys_margs);
-	kset_unregister(&gfs_kset);
+	kset_unregister(gfs_kset);
 }
diff --git a/gnbd-kernel/src/gnbd.c b/gnbd-kernel/src/gnbd.c
index 1be2eee..9a6abe3 100644
--- a/gnbd-kernel/src/gnbd.c
+++ b/gnbd-kernel/src/gnbd.c
@@ -266,21 +266,19 @@ static const char *gnbdcmd_to_ascii(int cmd)
 
 static void gnbd_end_request(struct request *req)
 {
-	int uptodate = (req->errors == 0) ? 1 : 0;
+	int error = req->errors ? -EIO : 0;
 	struct request_queue *q = req->q;
 	unsigned long flags;
 
 	dprintk(DBG_BLKDEV, "%s: request %p: %s\n", req->rq_disk->disk_name,
-			req, uptodate? "done": "failed");
+			req, error ? "failed" : "done");
 
-	if (!uptodate)
+	if (error)
 		printk("%s %d called gnbd_end_request with an error\n",
 		       current->comm, current->pid);	
 	
 	spin_lock_irqsave(q->queue_lock, flags);
-	if (!end_that_request_first(req, uptodate, req->nr_sectors)) {
-		end_that_request_last(req, uptodate);
-	}
+	__blk_end_request(req, error, req->nr_sectors << 9);
 	spin_unlock_irqrestore(q->queue_lock, flags);
 }
 
@@ -879,10 +877,8 @@ static int __init gnbd_init(void)
 	struct timeval tv;
 	int i;
 
-	if (sizeof(struct gnbd_request) != 28) {
-		printk(KERN_CRIT "gnbd: sizeof gnbd_request needs to be 28 in order to work!\n" );
-		return -EIO;
-	}
+	BUILD_BUG_ON(sizeof(struct gnbd_request) != 28);
+
 	shutdown_req.cmd_type = REQ_TYPE_SPECIAL;
 	gnbd_cmd(&shutdown_req) = GNBD_CMD_DISC;
 	shutdown_req.sector = 0;
@@ -984,7 +980,7 @@ static int __init gnbd_init(void)
 		set_capacity(disk, 0);
 		add_disk(disk);
 		if(sysfs_create_link(&gnbd_dev[i].class_dev.kobj,
-					&gnbd_dev[i].disk->kobj, "block"))
+					&gnbd_dev[i].disk->dev.kobj, "block"))
 			goto out_remove_disk;
 		
 	}
diff --git a/make/clean.mk b/make/clean.mk
index a8b9af6..560c4f9 100644
--- a/make/clean.mk
+++ b/make/clean.mk
@@ -1,6 +1,6 @@
 generalclean:
 	rm -rf *~* *.o *.a *.so *.so.* a.out *.po *.s *.d *.pyc
 	rm -rf core core.* .depend cscope.* *.orig *.rej
-	rm -rf linux .*.o.cmd .*.ko.cmd *.mod.c .tmp_versions Module.symvers .*.o.d
+	rm -rf linux .*.o.cmd .*.ko.cmd *.mod.c .tmp_versions Module.symvers .*.o.d modules.order
 	rm -rf ${TARGET} ${TARGETS} ${TARGET}_test
 	rm -rf ${TARGET1} ${TARGET2} ${TARGET3} ${TARGET4} ${TARGET5} ${TARGET6}


hooks/post-receive
--
Cluster Project


                 reply	other threads:[~2008-04-09 14:33 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20080409143304.25016.qmail@sourceware.org \
    --to=fabbione@sourceware.org \
    --cc=cluster-cvs@sources.redhat.com \
    --cc=cluster-devel@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).