[LU-4993] support for 3.14 linux kernel Created: 02/May/14  Updated: 08/Sep/14  Resolved: 08/Sep/14

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: Lustre 2.7.0

Type: Improvement Priority: Minor
Reporter: Bob Glossman (Inactive) Assignee: Bob Glossman (Inactive)
Resolution: Fixed Votes: 0
Labels: patch
Environment:

fc20


Issue Links:
Related
is related to LU-4416 support for 3.12 linux kernel Resolved
is related to LU-5014 vfs_unlink api change Resolved
is related to LU-5276 ldiskfs patches for FC19 Resolved
is related to LU-5322 support for 3.16 linux kernel Resolved
Rank (Obsolete): 13834

 Description   

tracker for 3.14 kernel support

fc20 recently bumped their kernel version from 3.13.x to 3.14.x
new build failures are now showing up



 Comments   
Comment by Bob Glossman (Inactive) [ 02/May/14 ]

can't even build client-only for 3.14. first set of build problems looks to be due to refactoring of struct bio

  CC [M]  /home/bogl/lustre-release/lustre/llite/lloop.o
/home/bogl/lustre-release/lustre/llite/lloop.c: In function ‘do_bio_lustrebacked’:
/home/bogl/lustre-release/lustre/llite/lloop.c:221:45: error: ‘struct bio’ has no member named ‘bi_sector’
                 offset = (pgoff_t)(bio->bi_sector << 9) + lo->lo_offset;
                                             ^
/home/bogl/lustre-release/lustre/llite/lloop.c:222:24: error: incompatible types when assigning to type ‘int’ from type ‘struct bvec_iter’
                 bio_for_each_segment(bvec, bio, i) {
                        ^
/home/bogl/lustre-release/lustre/llite/lloop.c:222:47: error: request for member ‘bi_size’ in something not a structure or union
                 bio_for_each_segment(bvec, bio, i) {
                                               ^
/home/bogl/lustre-release/lustre/llite/lloop.c:222:138: error: request for member ‘bi_idx’ in something not a structure or union
                 bio_for_each_segment(bvec, bio, i) {
                                                                                                                                          ^
/home/bogl/lustre-release/lustre/llite/lloop.c:222:188: error: request for member ‘bi_size’ in something not a structure or union
                 bio_for_each_segment(bvec, bio, i) {
                                                                                                                                                                                            ^
/home/bogl/lustre-release/lustre/llite/lloop.c:222:216: error: request for member ‘bi_size’ in something not a structure or union
                 bio_for_each_segment(bvec, bio, i) {
                                                                                                                                                                                                                        ^
/home/bogl/lustre-release/lustre/llite/lloop.c:222:272: error: request for member ‘bi_idx’ in something not a structure or union
                 bio_for_each_segment(bvec, bio, i) {
                                                                                                                                                                                                                                                                                ^
/home/bogl/lustre-release/lustre/llite/lloop.c:222:301: error: request for member ‘bi_bvec_done’ in something not a structure or union
                 bio_for_each_segment(bvec, bio, i) {
                                                                                                                                                                                                                                                                                                             ^
/home/bogl/lustre-release/lustre/llite/lloop.c:222:363: error: request for member ‘bi_idx’ in something not a structure or union
                 bio_for_each_segment(bvec, bio, i) {
                                                                                                                                                                                                                                                                                                                                                                           ^
/home/bogl/lustre-release/lustre/llite/lloop.c:222:392: error: request for member ‘bi_bvec_done’ in something not a structure or union
                 bio_for_each_segment(bvec, bio, i) {
                                                                                                                                                                                                                                                                                                                                                                                                        ^
/home/bogl/lustre-release/lustre/llite/lloop.c:222:522: error: request for member ‘bi_idx’ in something not a structure or union
                 bio_for_each_segment(bvec, bio, i) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          ^
/home/bogl/lustre-release/lustre/llite/lloop.c:222:554: error: request for member ‘bi_bvec_done’ in something not a structure or union
                 bio_for_each_segment(bvec, bio, i) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          ^
/home/bogl/lustre-release/lustre/llite/lloop.c:222:573: error: left-hand operand of comma expression has no effect [-Werror=unused-value]
                 bio_for_each_segment(bvec, bio, i) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             ^
/home/bogl/lustre-release/lustre/llite/lloop.c:222:615: error: request for member ‘bv_len’ in something not a structure or union
                 bio_for_each_segment(bvec, bio, i) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       ^
/home/bogl/lustre-release/lustre/llite/lloop.c:222:77: error: passing argument 2 of ‘bio_advance_iter’ from incompatible pointer type [-Werror]
                 bio_for_each_segment(bvec, bio, i) {
                                                                             ^
In file included from include/linux/blkdev.h:18:0,
                 from /home/bogl/lustre-release/lustre/llite/lloop.c:91:
include/linux/bio.h:225:60: note: expected ‘struct bvec_iter *’ but argument is of type ‘int *’
 static inline void bio_advance_iter(struct bio *bio, struct bvec_iter *iter,
                                                            ^
/home/bogl/lustre-release/lustre/llite/lloop.c: In function ‘loop_get_bio’:
/home/bogl/lustre-release/lustre/llite/lloop.c:313:206: error: ‘struct bio’ has no member named ‘bi_sector’
                 CDEBUG(D_INFO, "bio sector %llu size %u count %u vcnt%u \n",
                                                                                                                                                                                                              ^
/home/bogl/lustre-release/lustre/llite/lloop.c:313:225: error: ‘struct bio’ has no member named ‘bi_size’
                 CDEBUG(D_INFO, "bio sector %llu size %u count %u vcnt%u \n",
                                                                                                                                                                                                                                 ^
/home/bogl/lustre-release/lustre/llite/lloop.c: In function ‘loop_make_request’:
/home/bogl/lustre-release/lustre/llite/lloop.c:348:189: error: ‘struct bio’ has no member named ‘bi_sector’
         CDEBUG(D_INFO, "submit bio sector %llu size %u\n",
                                                                                                                                                                                             ^
/home/bogl/lustre-release/lustre/llite/lloop.c:348:209: error: ‘struct bio’ has no member named ‘bi_size’
         CDEBUG(D_INFO, "submit bio sector %llu size %u\n",
                                                                                                                                                                                                                 ^
cc1: all warnings being treated as errors
make[6]: *** [/home/bogl/lustre-release/lustre/llite/lloop.o] Error 1
make[5]: *** [/home/bogl/lustre-release/lustre/llite] Error 2
make[4]: *** [/home/bogl/lustre-release/lustre] Error 2
make[3]: *** [_module_/home/bogl/lustre-release] Error 2
make[3]: Leaving directory `/usr/src/kernels/3.14.2-200.fc20.x86_64'
make[2]: *** [modules] Error 2
make[2]: Leaving directory `/home/bogl/lustre-release'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/bogl/lustre-release'
make: *** [all] Error 2
Comment by James A Simmons [ 02/May/14 ]

Believe it or not I have patches for this already. I ran into this on my home debian system.Well I have to make the patch work with earlier kernels.

Comment by Peter Jones [ 02/May/14 ]

Oh I believe it

Comment by James A Simmons [ 15/May/14 ]

http://review.whamcloud.com/#/c/10332
http://review.whamcloud.com/#/c/10337

Sorry I couldn't make 10337 more pretty but it works.

Comment by Bob Glossman (Inactive) [ 15/May/14 ]

James, Why is http://review.whamcloud.com/#/c/10332 needed? I seem to be able to build clients that work without it.

Comment by James A Simmons [ 15/May/14 ]

I have a UMP machine running a 3.15 kernel at home. It gives me the ability to find issues that otherwise would go undetected with SMP devices.

Comment by Bob Glossman (Inactive) [ 13/Jun/14 ]

http://review.whamcloud.com/#/c/10337 has landed in master, but I think it's only good enough for clients. Strongly suspect there is more server only code that also needs adjustment for the HAVE_BVEC_ITER case. If I try a server build in a 3.14 kernel I see lots of build errors that I think are related:

  CC [M]  /home/bogl/lustre-release/lustre/osd-ldiskfs/osd_io.o
/home/bogl/lustre-release/lustre/osd-ldiskfs/osd_io.c: In function ‘dio_complete_routine’:
/home/bogl/lustre-release/lustre/osd-ldiskfs/osd_io.c:166:304: error: ‘struct bio’ has no member named ‘bi_idx’
   CERROR("bi_next: %p, bi_flags: %lx, bi_rw: %lu, bi_vcnt: %d, "
                                                                                                                                                                                                                                                                                                                ^
/home/bogl/lustre-release/lustre/osd-ldiskfs/osd_io.c:166:317: error: ‘struct bio’ has no member named ‘bi_size’
   CERROR("bi_next: %p, bi_flags: %lx, bi_rw: %lu, bi_vcnt: %d, "
                                                                                                                                                                                                                                                                                                                             ^
/home/bogl/lustre-release/lustre/osd-ldiskfs/osd_io.c:177:24: error: incompatible types when assigning to type ‘int’ from type ‘struct bvec_iter’
                 bio_for_each_segment(bvl, bio, i) {
                        ^
/home/bogl/lustre-release/lustre/osd-ldiskfs/osd_io.c:177:47: error: request for member ‘bi_size’ in something not a structure or union
                 bio_for_each_segment(bvl, bio, i) {
                                               ^
/home/bogl/lustre-release/lustre/osd-ldiskfs/osd_io.c:177:137: error: request for member ‘bi_idx’ in something not a structure or union
                 bio_for_each_segment(bvl, bio, i) {
                                                                                                                                         ^
/home/bogl/lustre-release/lustre/osd-ldiskfs/osd_io.c:177:187: error: request for member ‘bi_size’ in something not a structure or union
                 bio_for_each_segment(bvl, bio, i) {
                                                                                                                                                                                           ^
/home/bogl/lustre-release/lustre/osd-ldiskfs/osd_io.c:177:215: error: request for member ‘bi_size’ in something not a structure or union
                 bio_for_each_segment(bvl, bio, i) {
                                                                                                                                                                                                                       ^
/home/bogl/lustre-release/lustre/osd-ldiskfs/osd_io.c:177:271: error: request for member ‘bi_idx’ in something not a structure or union
                 bio_for_each_segment(bvl, bio, i) {
                                                                                                                                                                                                                                                                               ^
/home/bogl/lustre-release/lustre/osd-ldiskfs/osd_io.c:177:300: error: request for member ‘bi_bvec_done’ in something not a structure or union
                 bio_for_each_segment(bvl, bio, i) {
                                                                                                                                                                                                                                                                                                            ^
/home/bogl/lustre-release/lustre/osd-ldiskfs/osd_io.c:177:362: error: request for member ‘bi_idx’ in something not a structure or union
                 bio_for_each_segment(bvl, bio, i) {
                                                                                                                                                                                                                                                                                                                                                                          ^
/home/bogl/lustre-release/lustre/osd-ldiskfs/osd_io.c:177:391: error: request for member ‘bi_bvec_done’ in something not a structure or union
                 bio_for_each_segment(bvl, bio, i) {
                                                                                                                                                                                                                                                                                                                                                                                                       ^
/home/bogl/lustre-release/lustre/osd-ldiskfs/osd_io.c:177:521: error: request for member ‘bi_idx’ in something not a structure or union
                 bio_for_each_segment(bvl, bio, i) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         ^
/home/bogl/lustre-release/lustre/osd-ldiskfs/osd_io.c:177:553: error: request for member ‘bi_bvec_done’ in something not a structure or union
                 bio_for_each_segment(bvl, bio, i) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         ^
/home/bogl/lustre-release/lustre/osd-ldiskfs/osd_io.c:177:572: error: left-hand operand of comma expression has no effect [-Werror=unused-value]
                 bio_for_each_segment(bvl, bio, i) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ^
/home/bogl/lustre-release/lustre/osd-ldiskfs/osd_io.c:177:613: error: request for member ‘bv_len’ in something not a structure or union
                 bio_for_each_segment(bvl, bio, i) {
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     ^
/home/bogl/lustre-release/lustre/osd-ldiskfs/osd_io.c:177:76: error: passing argument 2 of ‘bio_advance_iter’ from incompatible pointer type [-Werror]
                 bio_for_each_segment(bvl, bio, i) {
                                                                            ^
In file included from include/linux/blkdev.h:18:0,
                 from /home/bogl/lustre-release/lustre/include/linux/obd_support.h:63,
                 from /home/bogl/lustre-release/lustre/include/obd_support.h:44,
                 from /home/bogl/lustre-release/lustre/osd-ldiskfs/osd_io.c:56:
include/linux/bio.h:225:60: note: expected ‘struct bvec_iter *’ but argument is of type ‘int *’
 static inline void bio_advance_iter(struct bio *bio, struct bvec_iter *iter,
                                                            ^
/home/bogl/lustre-release/lustre/osd-ldiskfs/osd_io.c: In function ‘can_be_merged’:
/home/bogl/lustre-release/lustre/osd-ldiskfs/osd_io.c:252:19: error: ‘struct bio’ has no member named ‘bi_size’
         size = bio->bi_size >> 9;
                   ^
/home/bogl/lustre-release/lustre/osd-ldiskfs/osd_io.c:253:19: error: ‘struct bio’ has no member named ‘bi_sector’
         return bio->bi_sector + size == sector ? 1 : 0;
                   ^
/home/bogl/lustre-release/lustre/osd-ldiskfs/osd_io.c: In function ‘osd_do_bio’:
/home/bogl/lustre-release/lustre/osd-ldiskfs/osd_io.c:324:222: error: ‘struct bio’ has no member named ‘bi_size’
                                 CDEBUG(D_INODE, "bio++ sz %d vcnt %d(%d) "
                                                                                                                                                                                                                              ^
/home/bogl/lustre-release/lustre/osd-ldiskfs/osd_io.c:324:268: error: ‘struct bio’ has no member named ‘bi_size’
                                 CDEBUG(D_INODE, "bio++ sz %d vcnt %d(%d) "
                                                                                                                                                                                                                                                                            ^
/home/bogl/lustre-release/lustre/osd-ldiskfs/osd_io.c:333:59: error: ‘struct bio’ has no member named ‘bi_size’
                                 record_start_io(iobuf, bio->bi_size);
                                                           ^
/home/bogl/lustre-release/lustre/osd-ldiskfs/osd_io.c:350:28: error: ‘struct bio’ has no member named ‘bi_sector’
                         bio->bi_sector = sector;
                            ^
/home/bogl/lustre-release/lustre/osd-ldiskfs/osd_io.c:362:43: error: ‘struct bio’ has no member named ‘bi_size’
                 record_start_io(iobuf, bio->bi_size);
                                           ^
/home/bogl/lustre-release/lustre/osd-ldiskfs/osd_io.c: In function ‘can_be_merged’:
/home/bogl/lustre-release/lustre/osd-ldiskfs/osd_io.c:254:1: error: control reaches end of non-void function [-Werror=return-type]
 }
 ^
cc1: all warnings being treated as errors
make[6]: *** [/home/bogl/lustre-release/lustre/osd-ldiskfs/osd_io.o] Error 1
make[5]: *** [/home/bogl/lustre-release/lustre/osd-ldiskfs] Error 2
make[4]: *** [/home/bogl/lustre-release/lustre] Error 2
make[3]: *** [_module_/home/bogl/lustre-release] Error 2
make[3]: Leaving directory `/home/bogl/rb/BUILD/kernel-3.14.6.200.l0613'
make[2]: *** [modules] Error 2
make[2]: Leaving directory `/home/bogl/lustre-release'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/bogl/lustre-release'
make: *** [all] Error 2
Comment by James A Simmons [ 06/Jul/14 ]

http://review.whamcloud.com/#/c/10332
http://review.whamcloud.com/#/c/10995

Comment by Bob Glossman (Inactive) [ 07/Jul/14 ]

with the new patch http://review.whamcloud.com/#/c/10995 it's once again possible to do full server builds for 3.14, including ldiskfs. It still requires a bunch of patches in flight and at least one for an ldiskfs patch series for 3.14 that hasn't even been pushed to gerrit yet. I have a working prototype for that on hand, but not exposed publicly yet.

Comment by James A Simmons [ 07/Jul/14 ]

Perhaps it is time to open a ticket for 3.16 support.

Comment by Bob Glossman (Inactive) [ 07/Jul/14 ]

ldiskfs for 3.14: http://review.whamcloud.com/11000

Comment by James A Simmons [ 07/Jul/14 ]

Is this the latest fc20 kernel?

Comment by Bob Glossman (Inactive) [ 07/Jul/14 ]

yes; 3.14.9-200

Comment by Bob Glossman (Inactive) [ 08/Jul/14 ]

We may very well need a ticket for 3.15 soon. I just saw that fc20 jumped versions overnight from 3.14.x to 3.15.x. Have yet to discover if we need anything extra for 3.15 beyond what we already have in flight for 3.14.

Comment by James A Simmons [ 09/Jul/14 ]

vfs_rename changed again and sk_data_ready api changed. I have patches already for those versions. This is when running against a 3.16 kernel.

Comment by Bob Glossman (Inactive) [ 09/Jul/14 ]

James, is 3.16 present in any distro yet like Fedora Core or are you working against strictly upstream kernel.org trees?

Comment by James A Simmons [ 09/Jul/14 ]

I'm working with upstream kernel in this case.

Comment by Bob Glossman (Inactive) [ 10/Jul/14 ]

James, It appears the sk_data_ready api change you mentioned is already present in 3.15 too. I'll go ahead and open a tracking ticket for 3.16 so we can start collecting mods needed for kernels > 3.14 there.

Comment by James A Simmons [ 10/Jul/14 ]

I updated http://review.whamcloud.com/#/c/10995. Please inspect.

Comment by Bob Glossman (Inactive) [ 10/Jul/14 ]

re: http://review.whamcloud.com/#/c/10995. don't want to +review it until I can build the HAVE_BVEC_ITER case again. Can't do that right now as the only kernel I can build with is the 3.15 kernel in fc20, and that fails due to LU-5322 issues. No patches for those yet.

Comment by James A Simmons [ 16/Jul/14 ]

Last patch at http://review.whamcloud.com/#/c/10995.

Comment by James A Simmons [ 16/Jul/14 ]

Last patch as landed. We can close this ticket.

Comment by Peter Jones [ 16/Jul/14 ]

Landed for 2.7

Comment by Bob Glossman (Inactive) [ 16/Jul/14 ]

don't think thai's correct. http://review.whamcloud.com/#/c/10995 still hasn't landed.

Comment by James A Simmons [ 16/Jul/14 ]

Yeah I thought this patch landed instead of the patch from LU-5322. Funny that all the non ldiskfs patches for LU-5322 landed first.

Comment by James A Simmons [ 08/Sep/14 ]

This time patch http://review.whamcloud.com/#/c/10995 really has landed to master. This ticket can be closed.

Comment by Peter Jones [ 08/Sep/14 ]

Landed for 2.7

Generated at Sat Feb 10 01:47:37 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.