[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MINIOS PATCH v3 06/12] use alloc_file_type() and get_file_from_fd() in blkfront



On 16/01/2022 08:33, Juergen Gross wrote:
> diff --git a/blkfront.c b/blkfront.c
> index e3f42bef..ed902702 100644
> --- a/blkfront.c
> +++ b/blkfront.c
> @@ -483,9 +483,13 @@ int blkfront_aio_poll(struct blkfront_dev *dev)
>  
>  moretodo:
>  #ifdef HAVE_LIBC
> -    if (dev->fd != -1) {
> -        files[dev->fd].read = false;
> -        mb(); /* Make sure to let the handler set read to 1 before we start 
> looking at the ring */
> +    {
> +        struct file *file = get_file_from_fd(dev->fd);
> +
> +        if ( file ) {

Style, as this is is being indented.

> +            file->read = false;
> +            mb(); /* Make sure to let the handler set read to 1 before we 
> start looking at the ring */

MiniOS is in desperate need of being dragged over to LKMM, and to stop
using inappropriate fences.  Things will go much faster when these have
all been corrected to smp barriers.

~Andrew



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.