Linux bcache driver list
 help / color / mirror / Atom feed
From: Kent Overstreet <kent.overstreet-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Mark Hills <mark-UrrBsZIrrsb10XsdtD+oqA@public.gmane.org>
Cc: linux-bcache-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 1/7] Use exported call to up/down read
Date: Sat, 10 Sep 2011 14:39:34 -0700	[thread overview]
Message-ID: <20110910213933.GB32536@moria> (raw)
In-Reply-To: <1315662339-3115-1-git-send-email-mark-UrrBsZIrrsb10XsdtD+oqA@public.gmane.org>

On Sat, Sep 10, 2011 at 02:45:33PM +0100, Mark Hills wrote:
> When building bcache as a module, the following errors are silenced
> by this patch:
> 
>   ERROR: "call_rwsem_down_read_failed" [block/bcache.ko] undefined!
>   ERROR: "call_rwsem_wake" [block/bcache.ko] undefined!
> 
> There may be implications of the extra code introduced by this, but
> I am not familiar with these functions. Though I can confirm that
> the resulting build seems to work.

Yeah, lockdep is going to complain loudly about that. The reason for the
__ versions is we release the lock in a different thread than we acquire
it in. There used to be down_read_non_owner() and up_read_non_owner(),
but those went away... I'll have to investigate further.

> ---
>  block/bcache.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/block/bcache.c b/block/bcache.c
> index a2dbd1e..faaf75e 100644
> --- a/block/bcache.c
> +++ b/block/bcache.c
> @@ -5561,7 +5561,7 @@ static void bio_complete(struct closure *cl)
>  	keylist_free(&s->op.keys);
>  
>  	if (s->op.insert_type & INSERT_WRITE)
> -		__up_read(&d->writeback_lock);
> +		up_read(&d->writeback_lock);
>  
>  	if (s->cache_bio) {
>  		int i;
> @@ -5911,7 +5911,7 @@ static void request_write(struct search *s)
>  	s->cl.fn		= bio_complete;
>  	s->op.insert_type	= INSERT_WRITE;
>  	check_should_skip(s);
> -	__down_read(&s->op.d->writeback_lock);
> +	down_read(&s->op.d->writeback_lock);
>  
>  	if (in_writeback(s->op.d, bio->bi_sector, bio_sectors(bio))) {
>  		s->skip = false;
> -- 
> 1.7.4.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bcache" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2011-09-10 21:39 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-10 13:44 First observations with bcache Mark Hills
     [not found] ` <1109101110320.2733-4jfXtw+jRJ582hYKe6nXyg@public.gmane.org>
2011-09-10 13:45   ` [PATCH 1/7] Use exported call to up/down read Mark Hills
     [not found]     ` <1315662339-3115-1-git-send-email-mark-UrrBsZIrrsb10XsdtD+oqA@public.gmane.org>
2011-09-10 13:45       ` [PATCH 2/7] Provide 64-bit arithmetic functions Mark Hills
2011-09-10 13:45       ` [PATCH 3/7] Break fuzz test to allow building as module Mark Hills
2011-09-10 13:45       ` [PATCH 4/7] Don't require linkage against closure_lock Mark Hills
2011-09-10 13:45       ` [PATCH 5/7] Allow closure debugging without CONFIG_DEBUG_FS Mark Hills
2011-09-10 13:45       ` [PATCH 6/7] Temporary fix to pr_latency() Mark Hills
2011-09-10 13:45       ` [PATCH 7/7] Don't require latency_warn_ms from bcache_util.o Mark Hills
2011-09-10 21:39       ` Kent Overstreet [this message]
2011-09-22  6:13   ` First observations with bcache Kent Overstreet
2011-09-22 23:14     ` Mark Hills

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=20110910213933.GB32536@moria \
    --to=kent.overstreet-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=linux-bcache-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mark-UrrBsZIrrsb10XsdtD+oqA@public.gmane.org \
    /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