From: Frederik Deweerdt <frederik.deweerdt@xprog.eu>
To: Evgeniy Polyakov <zbr@ioremap.net>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
linux-fsdevel@vger.kernel.org
Subject: Re: [resend take 3 0/4] Distributed storage.
Date: Wed, 26 Nov 2008 00:47:07 +0100 [thread overview]
Message-ID: <20081125234707.GG5324@gambetta> (raw)
In-Reply-To: <12276238703113-git-send-email-zbr@ioremap.net>
[-- Attachment #1: Type: text/plain, Size: 229 bytes --]
Hello Evgeniy,
The attached patch is needed to compile against 2.6.28-rc6 (changes in
block_devices_operations), I added a few cleanups as well.
Regards,
Frederik
Signed-off-by: Frederik Deweerdt <frederik.deweerdt@gmail.com>
[-- Attachment #2: dst --]
[-- Type: text/plain, Size: 3129 bytes --]
diff --git a/drivers/block/dst/dcore.c b/drivers/block/dst/dcore.c
index fea201b..cd84435 100644
--- a/drivers/block/dst/dcore.c
+++ b/drivers/block/dst/dcore.c
@@ -109,17 +109,17 @@ static int dst_request(struct request_queue *q, struct bio *bio)
/*
* Open/close callbacks for appropriate block device.
*/
-static int dst_bdev_open(struct inode *inode, struct file *filp)
+static int dst_bdev_open(struct block_device *bdev, fmode_t mode)
{
- struct dst_node *n = inode->i_bdev->bd_disk->private_data;
+ struct dst_node *n = bdev->bd_disk->private_data;
dst_node_get(n);
return 0;
}
-static int dst_bdev_release(struct inode *inode, struct file *filp)
+static int dst_bdev_release(struct gendisk *disk, fmode_t mode)
{
- struct dst_node *n = inode->i_bdev->bd_disk->private_data;
+ struct dst_node *n = disk->private_data;
dst_node_put(n);
return 0;
@@ -377,7 +377,7 @@ static void dst_node_cleanup(struct dst_node *n)
if (n->bdev) {
sync_blockdev(n->bdev);
- blkdev_put(n->bdev);
+ blkdev_put(n->bdev, FMODE_READ|FMODE_WRITE);
}
dst_state_lock(st);
@@ -502,7 +502,7 @@ static int dst_setup_export(struct dst_node *n, struct dst_ctl *ctl,
return 0;
err_out_cleanup:
- blkdev_put(n->bdev);
+ blkdev_put(n->bdev, FMODE_READ|FMODE_WRITE);
n->bdev = NULL;
return err;
diff --git a/drivers/block/dst/export.c b/drivers/block/dst/export.c
index c6bb0a5..122fe75 100644
--- a/drivers/block/dst/export.c
+++ b/drivers/block/dst/export.c
@@ -271,13 +271,13 @@ static void dst_state_cleanup_export(struct dst_state *st)
if (p)
bio_put(p->bio);
-
+
dprintk("%s: st: %p, refcnt: %d, list_empty: %d, p: %p.\n",
__func__, st, atomic_read(&st->refcnt),
list_empty(&st->request_list), p);
}
}
-
+
dst_state_put(st);
}
@@ -288,14 +288,14 @@ static void dst_state_cleanup_export(struct dst_state *st)
*/
static int dst_accept(void *init_data, void *schedule_data)
{
- struct dst_state *main = schedule_data;
+ struct dst_state *main_st = schedule_data;
struct dst_node *n = init_data;
struct dst_state *st;
int err;
- while (n->trans_scan_timeout && !main->need_exit) {
- dprintk("%s: main: %p, n: %p.\n", __func__, main, n);
- st = dst_accept_client(main);
+ while (n->trans_scan_timeout && !main_st->need_exit) {
+ dprintk("%s: main_st: %p, n: %p.\n", __func__, main_st, n);
+ st = dst_accept_client(main_st);
if (IS_ERR(st))
continue;
@@ -326,14 +326,14 @@ static int dst_accept(void *init_data, void *schedule_data)
dst_state_cleanup_export(st);
}
- dprintk("%s: freeing listening socket st: %p.\n", __func__, main);
-
- dst_state_lock(main);
- dst_poll_exit(main);
- dst_state_socket_release(main);
- dst_state_unlock(main);
- dst_state_put(main);
- dprintk("%s: freed listening socket st: %p.\n", __func__, main);
+ dprintk("%s: freeing listening socket st: %p.\n", __func__, main_st);
+
+ dst_state_lock(main_st);
+ dst_poll_exit(main_st);
+ dst_state_socket_release(main_st);
+ dst_state_unlock(main_st);
+ dst_state_put(main_st);
+ dprintk("%s: freed listening socket st: %p.\n", __func__, main_st);
return 0;
}
next prev parent reply other threads:[~2008-11-25 23:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-25 14:37 [resend take 3 0/4] Distributed storage Evgeniy Polyakov
2008-11-25 14:37 ` [resend take 3 1/4] DST core files Evgeniy Polyakov
2008-11-25 14:37 ` [resend take 3 2/4] DST network files Evgeniy Polyakov
2008-11-25 14:37 ` [resend take 3 3/4] DST crypto thread pool Evgeniy Polyakov
2008-11-25 14:37 ` [resend take 3 4/4] DST Makefile/Kconfig files Evgeniy Polyakov
2008-11-25 23:47 ` Frederik Deweerdt [this message]
2008-11-26 8:31 ` [resend take 3 0/4] Distributed storage Evgeniy Polyakov
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=20081125234707.GG5324@gambetta \
--to=frederik.deweerdt@xprog.eu \
--cc=akpm@linux-foundation.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=zbr@ioremap.net \
/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 NNTP newsgroup(s).