Repository navigation
Commit 676ce6d
block: replace __getblk_slow misfix by grow_dev_page fix
Commit 91f68c8 ("block: fix infinite loop in __getblk_slow")
is not good: a successful call to grow_buffers() cannot guarantee
that the page won't be reclaimed before the immediate next call to
__find_get_block(), which is why there was always a loop there.
Yesterday I got "EXT4-fs error (device loop0): __ext4_get_inode_loc:3595:
inode #19278: block 664: comm cc1: unable to read itable block" on console,
which pointed to this commit.
I've been trying to bisect for weeks, why kbuild-on-ext4-on-loop-on-tmpfs
sometimes fails from a missing header file, under memory pressure on
ppc G5. I've never seen this on x86, and I've never seen it on 3.5-rc7
itself, despite that commit being in there: bisection pointed to an
irrelevant pinctrl merge, but hard to tell when failure takes between
18 minutes and 38 hours (but so far it's happened quicker on 3.6-rc2).
(I've since found such __ext4_get_inode_loc errors in /var/log/messages
from previous weeks: why the message never appeared on console until
yesterday morning is a mystery for another day.)
Revert 91f68c8, restoring __getblk_slow() to how it was (plus
a checkpatch nitfix). Simplify the interface between grow_buffers()
and grow_dev_page(), and avoid the infinite loop beyond end of device
by instead checking init_page_buffers()'s end_block there (I presume
that's more efficient than a repeated call to blkdev_max_block()),
returning -ENXIO to __getblk_slow() in that case.
And remove akpm's ten-year-old "__getblk() cannot fail ... weird"
comment, but that is worrying: are all users of __getblk() really
now prepared for a NULL bh beyond end of device, or will some oops??
Signed-off-by: Hugh Dickins <hughd@google.com>
Cc: stable@vger.kernel.org # 3.0 3.2 3.4 3.5
Signed-off-by: Jens Axboe <axboe@kernel.dk>1 parent 79df9b4 commit 676ce6d
1 file changed
Lines changed: 30 additions & 36 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
914 | 914 | | |
915 | 915 | | |
916 | 916 | | |
917 | | - | |
| 917 | + | |
918 | 918 | | |
919 | 919 | | |
920 | 920 | | |
| |||
936 | 936 | | |
937 | 937 | | |
938 | 938 | | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
939 | 944 | | |
940 | 945 | | |
941 | 946 | | |
942 | 947 | | |
943 | 948 | | |
944 | | - | |
| 949 | + | |
945 | 950 | | |
946 | | - | |
| 951 | + | |
947 | 952 | | |
948 | | - | |
| 953 | + | |
949 | 954 | | |
950 | 955 | | |
951 | 956 | | |
952 | 957 | | |
| 958 | + | |
| 959 | + | |
953 | 960 | | |
954 | 961 | | |
955 | 962 | | |
956 | 963 | | |
957 | | - | |
| 964 | + | |
958 | 965 | | |
959 | 966 | | |
960 | 967 | | |
961 | 968 | | |
962 | 969 | | |
963 | 970 | | |
964 | | - | |
965 | | - | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
966 | 974 | | |
967 | 975 | | |
968 | 976 | | |
| |||
982 | 990 | | |
983 | 991 | | |
984 | 992 | | |
985 | | - | |
| 993 | + | |
986 | 994 | | |
987 | | - | |
988 | | - | |
| 995 | + | |
| 996 | + | |
989 | 997 | | |
990 | 998 | | |
991 | 999 | | |
992 | | - | |
| 1000 | + | |
993 | 1001 | | |
994 | 1002 | | |
995 | 1003 | | |
| |||
999 | 1007 | | |
1000 | 1008 | | |
1001 | 1009 | | |
1002 | | - | |
1003 | 1010 | | |
1004 | 1011 | | |
1005 | 1012 | | |
| |||
1023 | 1030 | | |
1024 | 1031 | | |
1025 | 1032 | | |
1026 | | - | |
| 1033 | + | |
1027 | 1034 | | |
1028 | | - | |
1029 | | - | |
1030 | | - | |
1031 | | - | |
1032 | | - | |
1033 | | - | |
| 1035 | + | |
1034 | 1036 | | |
1035 | 1037 | | |
1036 | 1038 | | |
1037 | 1039 | | |
1038 | 1040 | | |
1039 | | - | |
1040 | | - | |
1041 | | - | |
1042 | 1041 | | |
1043 | 1042 | | |
1044 | 1043 | | |
| |||
1051 | 1050 | | |
1052 | 1051 | | |
1053 | 1052 | | |
1054 | | - | |
1055 | | - | |
1056 | | - | |
1057 | | - | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
1058 | 1056 | | |
1059 | | - | |
1060 | | - | |
1061 | | - | |
1062 | | - | |
1063 | | - | |
1064 | 1057 | | |
1065 | 1058 | | |
1066 | 1059 | | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
1067 | 1066 | | |
1068 | | - | |
1069 | 1067 | | |
1070 | 1068 | | |
1071 | 1069 | | |
| |||
1321 | 1319 | | |
1322 | 1320 | | |
1323 | 1321 | | |
1324 | | - | |
1325 | | - | |
1326 | | - | |
1327 | | - | |
1328 | 1322 | | |
1329 | 1323 | | |
1330 | 1324 | | |
| |||
0 commit comments