All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heinz Mauelshagen <heinzm@redhat.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: dm-devel@redhat.com
Subject: Re: [bug report] dm: add emulated block size target
Date: Wed, 29 Apr 2020 17:09:30 +0200	[thread overview]
Message-ID: <0aca39de-3efb-e1ce-dfd5-6d3059799bd6@redhat.com> (raw)
In-Reply-To: <20200429132140.GA815210@mwanda>

Thanks for reporting this.

See patch to fix this submitted to dm-devel.

Heinz

On 4/29/20 3:21 PM, Dan Carpenter wrote:
> Hello Heinz Mauelshagen,
>
> The patch d3d11ad3d087: "dm: add emulated block size target" from Mar
> 9, 2020, leads to the following static checker warning:
>
> 	drivers/md/dm-ebs-target.c:190 __ebs_process_bios()
> 	warn: assigning signed to unsigned: 'bio->bi_status = r' '(-4095)-0'
>
> drivers/md/dm-ebs-target.c
>     173                          if (__block_mod(bio_end_sector(bio), ec->u_bs) && block2 != block1)
>     174                                  dm_bufio_prefetch(ec->bufio, block2, 1);
>     175                  }
>     176          }
>     177
>     178          bio_list_for_each(bio, &bios) {
>     179                  r = -EIO;
>     180                  if (bio_op(bio) == REQ_OP_READ)
>     181                          r = __ebs_rw_bio(ec, READ, bio);
>     182                  else if (bio_op(bio) == REQ_OP_WRITE) {
>     183                          write = true;
>     184                          r = __ebs_rw_bio(ec, WRITE, bio);
>     185                  } else if (bio_op(bio) == REQ_OP_DISCARD) {
>     186                          /* FIXME: (optionally) call dm_bufio_discard_buffers() once upstream. */
>     187                          r = __ebs_forget_bio(ec, bio);
>     188                  }
>     189
>     190                  bio->bi_status = r;
>                          ^^^^^^^^^^^^^^^^^^
> "r" is a negative error code and ->bi_status is a u8 so this won't work.
>
>     191          }
>     192
>     193          /*
>     194           * We write dirty buffers after processing I/O on them
>     195           * but before we endio thus addressing REQ_FUA/REQ_SYNC.
>     196           */
>     197          r = write ? dm_bufio_write_dirty_buffers(ec->bufio) : 0;
>
> regards,
> dan carpenter
>
>
> --
> dm-devel mailing list
> dm-devel@redhat.com
> https://www.redhat.com/mailman/listinfo/dm-devel

      reply	other threads:[~2020-04-29 15:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-29 13:21 [bug report] dm: add emulated block size target Dan Carpenter
2020-04-29 15:09 ` Heinz Mauelshagen [this message]

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=0aca39de-3efb-e1ce-dfd5-6d3059799bd6@redhat.com \
    --to=heinzm@redhat.com \
    --cc=dan.carpenter@oracle.com \
    --cc=dm-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 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.