On Tue, 4 Oct 2005, Chris Lightfoot wrote:

> --- ubd_kern.c.orig     2005-10-04 10:17:50.000000000 +0100
> +++ ubd_kern.c  2005-10-04 10:22:59.000000000 +0100
> @@ -68,6 +68,7 @@
>         unsigned long long cow_offset;
>         unsigned long bitmap_words[2];
>         int error;
> +        int barrier;
>  };
>
>  extern int open_ubd_file(char *file, struct openflags *openflags,
> @@ -825,6 +826,8 @@
>                 unregister_blkdev(MAJOR_NR, "ubd");
>                 return -1;
>         }
> +
> +        blk_queue_ordered(ubd_queue, QUEUE_ORDERED_TAG);
>
>         if (fake_major != MAJOR_NR) {
>                 char name[sizeof("ubd_nnn\0")];
> @@ -1003,6 +1006,8 @@
>         io_req->buffer = req->buffer;
>         io_req->sectorsize = 1 << 9;
>
> +        io_req->barrier = blk_barrier_rq(req);
> +
>         if(dev->cow.file != NULL)
>                 cowify_req(io_req, dev->cow.bitmap, dev->cow.bitmap_offset,
>                            dev->cow.bitmap_len);
> @@ -1334,6 +1339,8 @@
>                 start = end;
>         } while(start < nsectors);
>
> +        if (req->barrier) fdatasync(req->fds[bit]); /* XXX also sync before 
> this write? */
> +
>         req->error = update_bitmap(req);
>  }

Fix your tabbing.


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

Reply via email to