File: autoconf-bio-bi_opf.c

package info (click to toggle)
systemtap 5.1-5
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 47,964 kB
  • sloc: cpp: 80,838; ansic: 54,757; xml: 49,725; exp: 43,665; sh: 11,527; python: 5,003; perl: 2,252; tcl: 1,312; makefile: 1,006; javascript: 149; lisp: 105; awk: 101; asm: 91; java: 70; sed: 16
file content (29 lines) | stat: -rw-r--r-- 842 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include <linux/bio.h>

/*
 * Handle the following kernel commit:
 *
 *   commit 1eff9d322a444245c67515edb52bc0eb68374aa8
 *   Author: Jens Axboe <axboe@fb.com>
 *   Date:   Fri Aug 5 15:35:16 2016 -0600
 *   
 *       block: rename bio bi_rw to bi_opf
 *       
 *       Since commit 63a4cc24867d, bio->bi_rw contains flags in the lower
 *       portion and the op code in the higher portions. This means that
 *       old code that relies on manually setting bi_rw is most likely
 *       going to be broken. Instead of letting that brokeness linger,
 *       rename the member, to force old and out-of-tree code to break
 *       at compile time instead of at runtime.
 *       
 *       No intended functional changes in this commit.
 */

void bar (void);

void bar (void)
{
        struct bio foo;
	foo.bi_opf = 0;
        (void) foo;
}