Artem Bityutskiy [Wed, 3 Sep 2008 15:26:47 +0000 (18:26 +0300)]
UBIFS: make minimum fanout 3
UBIFS does not really work correctly when fanout is 2,
because of the way we manage the indexing tree. It may
just become a list and UBIFS screws up.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Artem Bityutskiy [Wed, 3 Sep 2008 13:17:14 +0000 (16:17 +0300)]
UBIFS: fix division by zero
If fanout is 3, we have division by zero in
'ubifs_read_superblock()':
divide error: 0000 [#1] PREEMPT SMP
Pid: 28744, comm: mount Not tainted (2.6.27-rc4-ubifs-2.6 #23)
EIP: 0060:[<
f8f9e3ef>] EFLAGS:
00010202 CPU: 0
EIP is at ubifs_reported_space+0x2d/0x69 [ubifs]
EAX:
00000000 EBX:
00000000 ECX:
00000000 EDX:
00000000
ESI:
00000000 EDI:
f0ae64b0 EBP:
f1f9fcf4 ESP:
f1f9fce0
DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Artem Bityutskiy [Wed, 3 Sep 2008 11:16:42 +0000 (14:16 +0300)]
UBIFS: amend f_fsid
David Woodhouse suggested to be consistent with other FSes
and xor the beginning and the end of the UUID.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Artem Bityutskiy [Sun, 31 Aug 2008 14:13:18 +0000 (17:13 +0300)]
UBIFS: fill f_fsid
UBIFS stores 16-bit UUID in the superblock, and it is a good
idea to return part of it in 'f_fsid' filed of kstatfs structure.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Artem Bityutskiy [Mon, 25 Aug 2008 15:58:19 +0000 (18:58 +0300)]
UBIFS: improve statfs reporting even more
Since free space we report in statfs is file size which should
fit to the FS - change the way we calculate free space and use
leb_overhead instead of dark_wm in calculations.
Results of "freespace" test (120MiB volume, 16KiB LEB size,
512 bytes page size). Before the change:
freespace: Test 1: fill the space we have 3 times
freespace: was free:
85204992 bytes 81.3 MiB, wrote:
96489472 bytes 92.0 MiB, delta:
11284480 bytes 10.8 MiB, wrote 13.2% more than predicted
freespace: was free:
83554304 bytes 79.7 MiB, wrote:
96489472 bytes 92.0 MiB, delta:
12935168 bytes 12.3 MiB, wrote 15.5% more than predicted
freespace: was free:
83554304 bytes 79.7 MiB, wrote:
96493568 bytes 92.0 MiB, delta:
12939264 bytes 12.3 MiB, wrote 15.5% more than predicted
freespace: Test 1 finished
freespace: Test 2: gradually lessen amount of free space and fill the FS
freespace: do 10 steps, lessen free space by
7596218 bytes 7.2 MiB each time
freespace: was free:
78675968 bytes 75.0 MiB, wrote:
88903680 bytes 84.8 MiB, delta:
10227712 bytes 9.8 MiB, wrote 13.0% more than predicted
freespace: was free:
72015872 bytes 68.7 MiB, wrote:
81514496 bytes 77.7 MiB, delta:
9498624 bytes 9.1 MiB, wrote 13.2% more than predicted
freespace: was free:
63938560 bytes 61.0 MiB, wrote:
72589312 bytes 69.2 MiB, delta:
8650752 bytes 8.2 MiB, wrote 13.5% more than predicted
freespace: was free:
56127488 bytes 53.5 MiB, wrote:
63762432 bytes 60.8 MiB, delta:
7634944 bytes 7.3 MiB, wrote 13.6% more than predicted
freespace: was free:
48336896 bytes 46.1 MiB, wrote:
54935552 bytes 52.4 MiB, delta:
6598656 bytes 6.3 MiB, wrote 13.7% more than predicted
freespace: was free:
40587264 bytes 38.7 MiB, wrote:
46157824 bytes 44.0 MiB, delta:
5570560 bytes 5.3 MiB, wrote 13.7% more than predicted
freespace: was free:
32841728 bytes 31.3 MiB, wrote:
37384192 bytes 35.7 MiB, delta:
4542464 bytes 4.3 MiB, wrote 13.8% more than predicted
freespace: was free:
25100288 bytes 23.9 MiB, wrote:
28618752 bytes 27.3 MiB, delta:
3518464 bytes 3.4 MiB, wrote 14.0% more than predicted
freespace: was free:
17342464 bytes 16.5 MiB, wrote:
19841024 bytes 18.9 MiB, delta:
2498560 bytes 2.4 MiB, wrote 14.4% more than predicted
freespace: was free:
9605120 bytes 9.2 MiB, wrote:
11063296 bytes 10.6 MiB, delta:
1458176 bytes 1.4 MiB, wrote 15.2% more than predicted
freespace: Test 2 finished
freespace: Test 3: gradually lessen amount of free space by trashing and fill the FS
freespace: do 10 steps, lessen free space by
7606272 bytes 7.3 MiB each time
freespace: trashing: was free:
83668992 bytes 79.8 MiB, need free:
7606272 bytes 7.3 MiB, files created: 248297, delete 225724 (90.9% of them)
freespace: was free:
70803456 bytes 67.5 MiB, wrote:
82485248 bytes 78.7 MiB, delta:
11681792 bytes 11.1 MiB, wrote 16.5% more than predicted
freespace: trashing: was free:
81080320 bytes 77.3 MiB, need free:
15212544 bytes 14.5 MiB, files created: 248711, delete 202047 (81.2% of them)
freespace: was free:
59867136 bytes 57.1 MiB, wrote:
71897088 bytes 68.6 MiB, delta:
12029952 bytes 11.5 MiB, wrote 20.1% more than predicted
freespace: trashing: was free:
82243584 bytes 78.4 MiB, need free:
22818816 bytes 21.8 MiB, files created: 248866, delete 179817 (72.3% of them)
freespace: was free:
50905088 bytes 48.5 MiB, wrote:
63168512 bytes 60.2 MiB, delta:
12263424 bytes 11.7 MiB, wrote 24.1% more than predicted
freespace: trashing: was free:
83402752 bytes 79.5 MiB, need free:
30425088 bytes 29.0 MiB, files created: 248920, delete 158114 (63.5% of them)
freespace: was free:
42651648 bytes 40.7 MiB, wrote:
55406592 bytes 52.8 MiB, delta:
12754944 bytes 12.2 MiB, wrote 29.9% more than predicted
freespace: trashing: was free:
84402176 bytes 80.5 MiB, need free:
38031360 bytes 36.3 MiB, files created: 248709, delete 136641 (54.9% of them)
freespace: was free:
35233792 bytes 33.6 MiB, wrote:
48250880 bytes 46.0 MiB, delta:
13017088 bytes 12.4 MiB, wrote 36.9% more than predicted
freespace: trashing: was free:
82530304 bytes 78.7 MiB, need free:
45637632 bytes 43.5 MiB, files created: 248778, delete 111208 (44.7% of them)
freespace: was free:
27287552 bytes 26.0 MiB, wrote:
40267776 bytes 38.4 MiB, delta:
12980224 bytes 12.4 MiB, wrote 47.6% more than predicted
freespace: trashing: was free:
85114880 bytes 81.2 MiB, need free:
53243904 bytes 50.8 MiB, files created: 248508, delete 93052 (37.4% of them)
freespace: was free:
22437888 bytes 21.4 MiB, wrote:
35328000 bytes 33.7 MiB, delta:
12890112 bytes 12.3 MiB, wrote 57.4% more than predicted
freespace: trashing: was free:
84103168 bytes 80.2 MiB, need free:
60850176 bytes 58.0 MiB, files created: 248637, delete 68743 (27.6% of them)
freespace: was free:
15536128 bytes 14.8 MiB, wrote:
28319744 bytes 27.0 MiB, delta:
12783616 bytes 12.2 MiB, wrote 82.3% more than predicted
freespace: trashing: was free:
84357120 bytes 80.4 MiB, need free:
68456448 bytes 65.3 MiB, files created: 248567, delete 46852 (18.8% of them)
freespace: was free:
9015296 bytes 8.6 MiB, wrote:
22044672 bytes 21.0 MiB, delta:
13029376 bytes 12.4 MiB, wrote 144.5% more than predicted
freespace: trashing: was free:
84942848 bytes 81.0 MiB, need free:
76062720 bytes 72.5 MiB, files created: 248636, delete 25993 (10.5% of them)
freespace: was free:
6086656 bytes 5.8 MiB, wrote:
8331264 bytes 7.9 MiB, delta:
2244608 bytes 2.1 MiB, wrote 36.9% more than predicted
freespace: Test 3 finished
freespace: finished successfully
After the change:
freespace: Test 1: fill the space we have 3 times
freespace: was free:
94048256 bytes 89.7 MiB, wrote:
96489472 bytes 92.0 MiB, delta:
2441216 bytes 2.3 MiB, wrote 2.6% more than predicted
freespace: was free:
92246016 bytes 88.0 MiB, wrote:
96493568 bytes 92.0 MiB, delta:
4247552 bytes 4.1 MiB, wrote 4.6% more than predicted
freespace: was free:
92254208 bytes 88.0 MiB, wrote:
96489472 bytes 92.0 MiB, delta:
4235264 bytes 4.0 MiB, wrote 4.6% more than predicted
freespace: Test 1 finished
freespace: Test 2: gradually lessen amount of free space and fill the FS
freespace: do 10 steps, lessen free space by
8386001 bytes 8.0 MiB each time
freespace: was free:
86605824 bytes 82.6 MiB, wrote:
88252416 bytes 84.2 MiB, delta:
1646592 bytes 1.6 MiB, wrote 1.9% more than predicted
freespace: was free:
78667776 bytes 75.0 MiB, wrote:
80715776 bytes 77.0 MiB, delta:
2048000 bytes 2.0 MiB, wrote 2.6% more than predicted
freespace: was free:
69615616 bytes 66.4 MiB, wrote:
71630848 bytes 68.3 MiB, delta:
2015232 bytes 1.9 MiB, wrote 2.9% more than predicted
freespace: was free:
61018112 bytes 58.2 MiB, wrote:
62783488 bytes 59.9 MiB, delta:
1765376 bytes 1.7 MiB, wrote 2.9% more than predicted
freespace: was free:
52424704 bytes 50.0 MiB, wrote:
53968896 bytes 51.5 MiB, delta:
1544192 bytes 1.5 MiB, wrote 2.9% more than predicted
freespace: was free:
43880448 bytes 41.8 MiB, wrote:
45199360 bytes 43.1 MiB, delta:
1318912 bytes 1.3 MiB, wrote 3.0% more than predicted
freespace: was free:
35332096 bytes 33.7 MiB, wrote:
36425728 bytes 34.7 MiB, delta:
1093632 bytes 1.0 MiB, wrote 3.1% more than predicted
freespace: was free:
26771456 bytes 25.5 MiB, wrote:
27643904 bytes 26.4 MiB, delta: 872448 bytes 852.0 KiB, wrote 3.3% more than predicted
freespace: was free:
18231296 bytes 17.4 MiB, wrote:
18878464 bytes 18.0 MiB, delta: 647168 bytes 632.0 KiB, wrote 3.5% more than predicted
freespace: was free:
9674752 bytes 9.2 MiB, wrote:
10088448 bytes 9.6 MiB, delta: 413696 bytes 404.0 KiB, wrote 4.3% more than predicted
freespace: Test 2 finished
freespace: Test 3: gradually lessen amount of free space by trashing and fill the FS
freespace: do 10 steps, lessen free space by
8397544 bytes 8.0 MiB each time
freespace: trashing: was free:
92372992 bytes 88.1 MiB, need free:
8397552 bytes 8.0 MiB, files created: 248296, delete 225723 (90.9% of them)
freespace: was free:
71909376 bytes 68.6 MiB, wrote:
82472960 bytes 78.7 MiB, delta:
10563584 bytes 10.1 MiB, wrote 14.7% more than predicted
freespace: trashing: was free:
88989696 bytes 84.9 MiB, need free:
16795096 bytes 16.0 MiB, files created: 248794, delete 201838 (81.1% of them)
freespace: was free:
60354560 bytes 57.6 MiB, wrote:
71782400 bytes 68.5 MiB, delta:
11427840 bytes 10.9 MiB, wrote 18.9% more than predicted
freespace: trashing: was free:
90304512 bytes 86.1 MiB, need free:
25192640 bytes 24.0 MiB, files created: 248733, delete 179342 (72.1% of them)
freespace: was free:
51187712 bytes 48.8 MiB, wrote:
62943232 bytes 60.0 MiB, delta:
11755520 bytes 11.2 MiB, wrote 23.0% more than predicted
freespace: trashing: was free:
91209728 bytes 87.0 MiB, need free:
33590184 bytes 32.0 MiB, files created: 248779, delete 157160 (63.2% of them)
freespace: was free:
42704896 bytes 40.7 MiB, wrote:
55050240 bytes 52.5 MiB, delta:
12345344 bytes 11.8 MiB, wrote 28.9% more than predicted
freespace: trashing: was free:
92700672 bytes 88.4 MiB, need free:
41987728 bytes 40.0 MiB, files created: 248848, delete 136135 (54.7% of them)
freespace: was free:
35250176 bytes 33.6 MiB, wrote:
48115712 bytes 45.9 MiB, delta:
12865536 bytes 12.3 MiB, wrote 36.5% more than predicted
freespace: trashing: was free:
93986816 bytes 89.6 MiB, need free:
50385272 bytes 48.1 MiB, files created: 248723, delete 115385 (46.4% of them)
freespace: was free:
29995008 bytes 28.6 MiB, wrote:
41582592 bytes 39.7 MiB, delta:
11587584 bytes 11.1 MiB, wrote 38.6% more than predicted
freespace: trashing: was free:
91881472 bytes 87.6 MiB, need free:
58782816 bytes 56.1 MiB, files created: 248645, delete 89569 (36.0% of them)
freespace: was free:
22511616 bytes 21.5 MiB, wrote:
34705408 bytes 33.1 MiB, delta:
12193792 bytes 11.6 MiB, wrote 54.2% more than predicted
freespace: trashing: was free:
91774976 bytes 87.5 MiB, need free:
67180360 bytes 64.1 MiB, files created: 248580, delete 66616 (26.8% of them)
freespace: was free:
16908288 bytes 16.1 MiB, wrote:
26898432 bytes 25.7 MiB, delta:
9990144 bytes 9.5 MiB, wrote 59.1% more than predicted
freespace: trashing: was free:
92450816 bytes 88.2 MiB, need free:
75577904 bytes 72.1 MiB, files created: 248654, delete 45381 (18.3% of them)
freespace: was free:
10170368 bytes 9.7 MiB, wrote:
19111936 bytes 18.2 MiB, delta:
8941568 bytes 8.5 MiB, wrote 87.9% more than predicted
freespace: trashing: was free:
93282304 bytes 89.0 MiB, need free:
83975448 bytes 80.1 MiB, files created: 248513, delete 24794 (10.0% of them)
freespace: was free:
3911680 bytes 3.7 MiB, wrote:
7872512 bytes 7.5 MiB, delta:
3960832 bytes 3.8 MiB, wrote 101.3% more than predicted
freespace: Test 3 finished
freespace: finished successfully
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Artem Bityutskiy [Fri, 22 Aug 2008 15:23:22 +0000 (18:23 +0300)]
UBIFS: introduce LEB overhead
This is a preparational patch for the following statfs()
report fix.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Artem Bityutskiy [Mon, 25 Aug 2008 15:34:45 +0000 (18:34 +0300)]
UBIFS: add forgotten gc_idx_lebs component
We add this component at other similar places, but not in this
one.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Artem Bityutskiy [Mon, 25 Aug 2008 15:32:57 +0000 (18:32 +0300)]
UBIFS: fix assertion
The assertion was incorrect, because it did not take into
account free space.
This patch also amends the comments correspondingly, and
cleans them up a little.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Artem Bityutskiy [Mon, 25 Aug 2008 13:15:56 +0000 (16:15 +0300)]
UBIFS: improve statfs reporting
Make free space calculation less pessimistic and more realistic,
which in turn improves 'statfs()' reports. Now it lies by 10%-20%,
instead of 20%-30% (10% more honest).
Results of "freespace" test (120MiB volume, 16KiB LEB size,
512 bytes page size). Before the change:
freespace: Test 1: fill the space we have 3 times
freespace: was free:
78274560 bytes 74.6 MiB, wrote:
96489472 bytes 92.0 MiB, delta:
18214912 bytes 17.4 MiB, wrote 23.3% more than predicted
freespace: was free:
76754944 bytes 73.2 MiB, wrote:
96493568 bytes 92.0 MiB, delta:
19738624 bytes 18.8 MiB, wrote 25.7% more than predicted
freespace: was free:
76759040 bytes 73.2 MiB, wrote:
96489472 bytes 92.0 MiB, delta:
19730432 bytes 18.8 MiB, wrote 25.7% more than predicted
freespace: Test 1 finished
freespace: Test 2: gradually lessen amount of free space and fill the FS
freespace: do 10 steps, lessen free space by
6977722 bytes 6.7 MiB each time
freespace: was free:
72273920 bytes 68.9 MiB, wrote:
88891392 bytes 84.8 MiB, delta:
16617472 bytes 15.8 MiB, wrote 23.0% more than predicted
freespace: was free:
66154496 bytes 63.1 MiB, wrote:
81506304 bytes 77.7 MiB, delta:
15351808 bytes 14.6 MiB, wrote 23.2% more than predicted
freespace: was free:
58732544 bytes 56.0 MiB, wrote:
72572928 bytes 69.2 MiB, delta:
13840384 bytes 13.2 MiB, wrote 23.6% more than predicted
freespace: was free:
51552256 bytes 49.2 MiB, wrote:
63754240 bytes 60.8 MiB, delta:
12201984 bytes 11.6 MiB, wrote 23.7% more than predicted
freespace: was free:
44404736 bytes 42.3 MiB, wrote:
54943744 bytes 52.4 MiB, delta:
10539008 bytes 10.1 MiB, wrote 23.7% more than predicted
freespace: was free:
37285888 bytes 35.6 MiB, wrote:
46161920 bytes 44.0 MiB, delta:
8876032 bytes 8.5 MiB, wrote 23.8% more than predicted
freespace: was free:
30171136 bytes 28.8 MiB, wrote:
37384192 bytes 35.7 MiB, delta:
7213056 bytes 6.9 MiB, wrote 23.9% more than predicted
freespace: was free:
23048192 bytes 22.0 MiB, wrote:
28606464 bytes 27.3 MiB, delta:
5558272 bytes 5.3 MiB, wrote 24.1% more than predicted
freespace: was free:
15941632 bytes 15.2 MiB, wrote:
19828736 bytes 18.9 MiB, delta:
3887104 bytes 3.7 MiB, wrote 24.4% more than predicted
freespace: was free:
8830976 bytes 8.4 MiB, wrote:
11063296 bytes 10.6 MiB, delta:
2232320 bytes 2.1 MiB, wrote 25.3% more than predicted
freespace: Test 2 finished
freespace: Test 3: gradually lessen amount of free space by trashing and fill the FS
freespace: do 10 steps, lessen free space by
6985541 bytes 6.7 MiB each time
freespace: trashing: was free:
76840960 bytes 73.3 MiB, need free:
6985550 bytes 6.7 MiB, files created: 248311, delete 225737 (90.9% of them)
freespace: was free:
65228800 bytes 62.2 MiB, wrote:
82530304 bytes 78.7 MiB, delta:
17301504 bytes 16.5 MiB, wrote 26.5% more than predicted
freespace: trashing: was free:
74485760 bytes 71.0 MiB, need free:
13971091 bytes 13.3 MiB, files created: 248712, delete 202061 (81.2% of them)
freespace: was free:
55025664 bytes 52.5 MiB, wrote:
71925760 bytes 68.6 MiB, delta:
16900096 bytes 16.1 MiB, wrote 30.7% more than predicted
freespace: trashing: was free:
75550720 bytes 72.1 MiB, need free:
20956632 bytes 20.0 MiB, files created: 248849, delete 179822 (72.3% of them)
freespace: was free:
46669824 bytes 44.5 MiB, wrote:
63197184 bytes 60.3 MiB, delta:
16527360 bytes 15.8 MiB, wrote 35.4% more than predicted
freespace: trashing: was free:
76214272 bytes 72.7 MiB, need free:
27942173 bytes 26.6 MiB, files created: 248789, delete 157576 (63.3% of them)
freespace: was free:
39129088 bytes 37.3 MiB, wrote:
55164928 bytes 52.6 MiB, delta:
16035840 bytes 15.3 MiB, wrote 41.0% more than predicted
freespace: trashing: was free:
77398016 bytes 73.8 MiB, need free:
34927714 bytes 33.3 MiB, files created: 248711, delete 136474 (54.9% of them)
freespace: was free:
32325632 bytes 30.8 MiB, wrote:
48234496 bytes 46.0 MiB, delta:
15908864 bytes 15.2 MiB, wrote 49.2% more than predicted
freespace: trashing: was free:
75796480 bytes 72.3 MiB, need free:
41913255 bytes 40.0 MiB, files created: 248674, delete 111164 (44.7% of them)
freespace: was free:
25079808 bytes 23.9 MiB, wrote:
40775680 bytes 38.9 MiB, delta:
15695872 bytes 15.0 MiB, wrote 62.6% more than predicted
freespace: trashing: was free:
78209024 bytes 74.6 MiB, need free:
48898796 bytes 46.6 MiB, files created: 248708, delete 93207 (37.5% of them)
freespace: was free:
20582400 bytes 19.6 MiB, wrote:
34844672 bytes 33.2 MiB, delta:
14262272 bytes 13.6 MiB, wrote 69.3% more than predicted
freespace: trashing: was free:
77328384 bytes 73.7 MiB, need free:
55884337 bytes 53.3 MiB, files created: 248644, delete 68951 (27.7% of them)
freespace: was free:
14368768 bytes 13.7 MiB, wrote:
28278784 bytes 27.0 MiB, delta:
13910016 bytes 13.3 MiB, wrote 96.8% more than predicted
freespace: trashing: was free:
77434880 bytes 73.8 MiB, need free:
62869878 bytes 60.0 MiB, files created: 248640, delete 46767 (18.8% of them)
freespace: was free:
8286208 bytes 7.9 MiB, wrote:
21811200 bytes 20.8 MiB, delta:
13524992 bytes 12.9 MiB, wrote 163.2% more than predicted
freespace: trashing: was free:
77856768 bytes 74.2 MiB, need free:
69855419 bytes 66.6 MiB, files created: 248576, delete 25546 (10.3% of them)
freespace: was free:
5570560 bytes 5.3 MiB, wrote:
8187904 bytes 7.8 MiB, delta:
2617344 bytes 2.5 MiB, wrote 47.0% more than predicted
freespace: Test 3 finished
freespace: finished successfully
After the change:
freespace: Test 1: fill the space we have 3 times
freespace: was free:
85204992 bytes 81.3 MiB, wrote:
96489472 bytes 92.0 MiB, delta:
11284480 bytes 10.8 MiB, wrote 13.2% more than predicted
freespace: was free:
83554304 bytes 79.7 MiB, wrote:
96489472 bytes 92.0 MiB, delta:
12935168 bytes 12.3 MiB, wrote 15.5% more than predicted
freespace: was free:
83554304 bytes 79.7 MiB, wrote:
96493568 bytes 92.0 MiB, delta:
12939264 bytes 12.3 MiB, wrote 15.5% more than predicted
freespace: Test 1 finished
freespace: Test 2: gradually lessen amount of free space and fill the FS
freespace: do 10 steps, lessen free space by
7596218 bytes 7.2 MiB each time
freespace: was free:
78675968 bytes 75.0 MiB, wrote:
88903680 bytes 84.8 MiB, delta:
10227712 bytes 9.8 MiB, wrote 13.0% more than predicted
freespace: was free:
72015872 bytes 68.7 MiB, wrote:
81514496 bytes 77.7 MiB, delta:
9498624 bytes 9.1 MiB, wrote 13.2% more than predicted
freespace: was free:
63938560 bytes 61.0 MiB, wrote:
72589312 bytes 69.2 MiB, delta:
8650752 bytes 8.2 MiB, wrote 13.5% more than predicted
freespace: was free:
56127488 bytes 53.5 MiB, wrote:
63762432 bytes 60.8 MiB, delta:
7634944 bytes 7.3 MiB, wrote 13.6% more than predicted
freespace: was free:
48336896 bytes 46.1 MiB, wrote:
54935552 bytes 52.4 MiB, delta:
6598656 bytes 6.3 MiB, wrote 13.7% more than predicted
freespace: was free:
40587264 bytes 38.7 MiB, wrote:
46157824 bytes 44.0 MiB, delta:
5570560 bytes 5.3 MiB, wrote 13.7% more than predicted
freespace: was free:
32841728 bytes 31.3 MiB, wrote:
37384192 bytes 35.7 MiB, delta:
4542464 bytes 4.3 MiB, wrote 13.8% more than predicted
freespace: was free:
25100288 bytes 23.9 MiB, wrote:
28618752 bytes 27.3 MiB, delta:
3518464 bytes 3.4 MiB, wrote 14.0% more than predicted
freespace: was free:
17342464 bytes 16.5 MiB, wrote:
19841024 bytes 18.9 MiB, delta:
2498560 bytes 2.4 MiB, wrote 14.4% more than predicted
freespace: was free:
9605120 bytes 9.2 MiB, wrote:
11063296 bytes 10.6 MiB, delta:
1458176 bytes 1.4 MiB, wrote 15.2% more than predicted
freespace: Test 2 finished
freespace: Test 3: gradually lessen amount of free space by trashing and fill the FS
freespace: do 10 steps, lessen free space by
7606272 bytes 7.3 MiB each time
freespace: trashing: was free:
83668992 bytes 79.8 MiB, need free:
7606272 bytes 7.3 MiB, files created: 248297, delete 225724 (90.9% of them)
freespace: was free:
70803456 bytes 67.5 MiB, wrote:
82485248 bytes 78.7 MiB, delta:
11681792 bytes 11.1 MiB, wrote 16.5% more than predicted
freespace: trashing: was free:
81080320 bytes 77.3 MiB, need free:
15212544 bytes 14.5 MiB, files created: 248711, delete 202047 (81.2% of them)
freespace: was free:
59867136 bytes 57.1 MiB, wrote:
71897088 bytes 68.6 MiB, delta:
12029952 bytes 11.5 MiB, wrote 20.1% more than predicted
freespace: trashing: was free:
82243584 bytes 78.4 MiB, need free:
22818816 bytes 21.8 MiB, files created: 248866, delete 179817 (72.3% of them)
freespace: was free:
50905088 bytes 48.5 MiB, wrote:
63168512 bytes 60.2 MiB, delta:
12263424 bytes 11.7 MiB, wrote 24.1% more than predicted
freespace: trashing: was free:
83402752 bytes 79.5 MiB, need free:
30425088 bytes 29.0 MiB, files created: 248920, delete 158114 (63.5% of them)
freespace: was free:
42651648 bytes 40.7 MiB, wrote:
55406592 bytes 52.8 MiB, delta:
12754944 bytes 12.2 MiB, wrote 29.9% more than predicted
freespace: trashing: was free:
84402176 bytes 80.5 MiB, need free:
38031360 bytes 36.3 MiB, files created: 248709, delete 136641 (54.9% of them)
freespace: was free:
35233792 bytes 33.6 MiB, wrote:
48250880 bytes 46.0 MiB, delta:
13017088 bytes 12.4 MiB, wrote 36.9% more than predicted
freespace: trashing: was free:
82530304 bytes 78.7 MiB, need free:
45637632 bytes 43.5 MiB, files created: 248778, delete 111208 (44.7% of them)
freespace: was free:
27287552 bytes 26.0 MiB, wrote:
40267776 bytes 38.4 MiB, delta:
12980224 bytes 12.4 MiB, wrote 47.6% more than predicted
freespace: trashing: was free:
85114880 bytes 81.2 MiB, need free:
53243904 bytes 50.8 MiB, files created: 248508, delete 93052 (37.4% of them)
freespace: was free:
22437888 bytes 21.4 MiB, wrote:
35328000 bytes 33.7 MiB, delta:
12890112 bytes 12.3 MiB, wrote 57.4% more than predicted
freespace: trashing: was free:
84103168 bytes 80.2 MiB, need free:
60850176 bytes 58.0 MiB, files created: 248637, delete 68743 (27.6% of them)
freespace: was free:
15536128 bytes 14.8 MiB, wrote:
28319744 bytes 27.0 MiB, delta:
12783616 bytes 12.2 MiB, wrote 82.3% more than predicted
freespace: trashing: was free:
84357120 bytes 80.4 MiB, need free:
68456448 bytes 65.3 MiB, files created: 248567, delete 46852 (18.8% of them)
freespace: was free:
9015296 bytes 8.6 MiB, wrote:
22044672 bytes 21.0 MiB, delta:
13029376 bytes 12.4 MiB, wrote 144.5% more than predicted
freespace: trashing: was free:
84942848 bytes 81.0 MiB, need free:
76062720 bytes 72.5 MiB, files created: 248636, delete 25993 (10.5% of them)
freespace: was free:
6086656 bytes 5.8 MiB, wrote:
8331264 bytes 7.9 MiB, delta:
2244608 bytes 2.1 MiB, wrote 36.9% more than predicted
freespace: Test 3 finished
freespace: finished successfully
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Artem Bityutskiy [Mon, 25 Aug 2008 13:02:31 +0000 (16:02 +0300)]
UBIFS: remove incorrect index space check
When we report free space to user-space, we should not report
0 if the amount of empty LEBs is too low, because they would
be produced by GC when needed. Thus, just call
'ubifs_calc_available()' straight away which would take
'min_idx_lebs' into account anyway.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Artem Bityutskiy [Mon, 25 Aug 2008 14:29:43 +0000 (17:29 +0300)]
UBIFS: push empty flash hack down
We have a hack which forces the amount of flash space to be
equivalent to 'c->blocks_cnt' in case of empty FS. This is
to make users happy and see '%0' used in 'df' when they
mount an empty FS. This hack is not needed in
'ubifs_calc_available()', but it is only needed the caller,
in 'ubifs_budg_get_free_space()'. So push it down there.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Artem Bityutskiy [Fri, 22 Aug 2008 09:26:40 +0000 (12:26 +0300)]
UBIFS: do not update min_idx_lebs in stafs
This is bad because the rest of the code should not depend on it,
and this may hide bugss, instead of revealing them.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Adrian Hunter [Fri, 22 Aug 2008 11:23:35 +0000 (14:23 +0300)]
UBIFS: allow for racing between GC and TNC
The TNC mutex is unlocked prematurely when reading leaf nodes
with non-hashed keys. This is unsafe because the node may be
moved by garbage collection and the eraseblock unmapped, although
that has never actually happened during stress testing.
This patch fixes the flaw by detecting the race and retrying with
the TNC mutex locked.
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Adrian Hunter [Wed, 20 Aug 2008 13:32:40 +0000 (16:32 +0300)]
UBIFS: always read hashed-key nodes under TNC mutex
Leaf-nodes that have a hashed key are stored in the
leaf-node-cache (LNC) which is protected by the TNC
mutex. Consequently, when reading a leaf node with
a hashed key (i.e. directory entries, xattr entries)
the TNC mutex is always required.
Signed-off-by: Adrian Hunter <ext-adrian.hunter@nokia.com>
Artem Bityutskiy [Wed, 20 Aug 2008 14:16:34 +0000 (17:16 +0300)]
UBIFS: fix zero-length truncations
Always allow truncations to zero, even if budgeting thinks there
is no space. UBIFS reserves some space for deletions anyway.
Otherwise, the following happans:
1. create a file, and write as much as possible there, until ENOSPC
2. truncate the file, which fails with ENOSPC, which is not good.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Linus Torvalds [Thu, 21 Aug 2008 02:35:56 +0000 (19:35 -0700)]
Linux v2.6.27-rc4
Al Viro [Wed, 20 Aug 2008 21:09:24 +0000 (14:09 -0700)]
cramfs: fix named-pipe handling
After commit
a97c9bf33f4612e2aed6f000f6b1d268b6814f3c (fix cramfs
making duplicate entries in inode cache) in kernel 2.6.14, named-pipe
on cramfs does not work properly.
It seems the commit make all named-pipe on cramfs share their inode
(and named-pipe buffer).
Make ..._test() refuse to merge inodes with ->i_ino == 1, take inode setup
back to get_cramfs_inode() and make ->drop_inode() evict ones with ->i_ino
== 1 immediately.
Reported-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: <stable@kernel.org> [2.6.14 and later]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Ian Campbell [Wed, 20 Aug 2008 21:09:23 +0000 (14:09 -0700)]
fbdefio: add set_page_dirty handler to deferred IO FB
Fixes kernel BUG at lib/radix-tree.c:473.
Previously the handler was incidentally provided by tmpfs but this was
removed with:
commit
14fcc23fdc78e9d32372553ccf21758a9bd56fa1
Author: Hugh Dickins <hugh@veritas.com>
Date: Mon Jul 28 15:46:19 2008 -0700
tmpfs: fix kernel BUG in shmem_delete_inode
relying on this behaviour was incorrect in any case and the BUG also
appeared when the device node was on an ext3 filesystem.
v2: override a_ops at open() time rather than mmap() time to minimise
races per AKPM's concerns.
Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
Cc: Jaya Kumar <jayakumar.lkml@gmail.com>
Cc: Nick Piggin <npiggin@suse.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Hugh Dickins <hugh@veritas.com>
Cc: Johannes Weiner <hannes@saeurebad.de>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Kel Modderman <kel@otaku42.de>
Cc: Markus Armbruster <armbru@redhat.com>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Cc: <stable@kernel.org> [14fcc23fd is in 2.6.25.14 and 2.6.26.1]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Anton Vorontsov [Wed, 20 Aug 2008 21:09:21 +0000 (14:09 -0700)]
rtc: rtc-ds1374: fix 'no irq' case handling
On a PowerPC board with ds1374 RTC I'm getting this error while RTC tries
to probe:
rtc-ds1374 0-0068: unable to request IRQ
This happens because I2C probing code (drivers/of/of_i2c.c) is specifying
IRQ0 for 'no irq' case, which is correct.
The driver handles this incorrectly, though. This patch fixes it.
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Cc: David Brownell <david-b@pacbell.net>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Nick Piggin [Wed, 20 Aug 2008 21:09:20 +0000 (14:09 -0700)]
mm: xip/ext2 fix block allocation race
XIP can call into get_xip_mem concurrently with the same file,offset with
create=1. This usually maps down to get_block, which expects the page
lock to prevent such a situation. This causes ext2 to explode for one
reason or another.
Serialise those calls for the moment. For common usages today, I suspect
get_xip_mem rarely is called to create new blocks. In future as XIP
technologies evolve we might need to look at which operations require
scalability, and rework the locking to suit.
Signed-off-by: Nick Piggin <npiggin@suse.de>
Cc: Jared Hulbert <jaredeh@gmail.com>
Acked-by: Carsten Otte <cotte@freenet.de>
Cc: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Nick Piggin [Wed, 20 Aug 2008 21:09:20 +0000 (14:09 -0700)]
mm: xip fix fault vs sparse page invalidate race
XIP has a race between sparse pages being inserted into page tables, and
sparse pages being zapped when its time to put a non-sparse page in.
What can happen is that a process can be left with a dangling sparse page
in a MAP_SHARED mapping, while the rest of the world sees the non-sparse
version. Ie. data corruption.
Guard these operations with a seqlock, making fault-in-sparse-pages the
slowpath, and try-to-unmap-sparse-pages the fastpath.
Signed-off-by: Nick Piggin <npiggin@suse.de>
Cc: Jared Hulbert <jaredeh@gmail.com>
Acked-by: Carsten Otte <cotte@freenet.de>
Cc: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Nick Piggin [Wed, 20 Aug 2008 21:09:18 +0000 (14:09 -0700)]
mm: dirty page tracking race fix
There is a race with dirty page accounting where a page may not properly
be accounted for.
clear_page_dirty_for_io() calls page_mkclean; then TestClearPageDirty.
page_mkclean walks the rmaps for that page, and for each one it cleans and
write protects the pte if it was dirty. It uses page_check_address to
find the pte. That function has a shortcut to avoid the ptl if the pte is
not present. Unfortunately, the pte can be switched to not-present then
back to present by other code while holding the page table lock -- this
should not be a signal for page_mkclean to ignore that pte, because it may
be dirty.
For example, powerpc64's set_pte_at will clear a previously present pte
before setting it to the desired value. There may also be other code in
core mm or in arch which do similar things.
The consequence of the bug is loss of data integrity due to msync, and
loss of dirty page accounting accuracy. XIP's __xip_unmap could easily
also be unreliable (depending on the exact XIP locking scheme), which can
lead to data corruption.
Fix this by having an option to always take ptl to check the pte in
page_check_address.
It's possible to retain this optimization for page_referenced and
try_to_unmap.
Signed-off-by: Nick Piggin <npiggin@suse.de>
Cc: Jared Hulbert <jaredeh@gmail.com>
Cc: Carsten Otte <cotte@freenet.de>
Cc: Hugh Dickins <hugh@veritas.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Ken Chen [Wed, 20 Aug 2008 21:09:17 +0000 (14:09 -0700)]
fix setpriority(PRIO_PGRP) thread iterator breakage
When user calls sys_setpriority(PRIO_PGRP ...) on a NPTL style multi-LWP
process, only the task leader of the process is affected, all other
sibling LWP threads didn't receive the setting. The problem was that the
iterator used in sys_setpriority() only iteartes over one task for each
process, ignoring all other sibling thread.
Introduce a new macro do_each_pid_thread / while_each_pid_thread to walk
each thread of a process. Convert 4 call sites in {set/get}priority and
ioprio_{set/get}.
Signed-off-by: Ken Chen <kenchen@google.com>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Roland McGrath <roland@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Michael Hennerich [Wed, 20 Aug 2008 21:09:16 +0000 (14:09 -0700)]
Video/Framebuffer: add fuctional power management support to Blackfin BF54x LQ043 framebuffer driver
Fix bug: does nor properply resume after suspend mem
Fix for PM_SUSPEND_MEM: Save and restore peripheral base and DMA registers
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Acked-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Johannes Weiner [Wed, 20 Aug 2008 21:09:15 +0000 (14:09 -0700)]
bootmem: fix aligning of node-relative indexes and offsets
Absolute alignment requirements may never be applied to node-relative
offsets. Andreas Herrmann spotted this flaw when a bootmem allocation on
an unaligned node was itself not aligned because the combination of an
unaligned node with an aligned offset into that node is not garuanteed to
be aligned itself.
This patch introduces two helper functions that align a node-relative
index or offset with respect to the node's starting address so that the
absolute PFN or virtual address that results from combining the two
satisfies the requested alignment.
Then all the broken ALIGN()s in alloc_bootmem_core() are replaced by these
helpers.
Signed-off-by: Johannes Weiner <hannes@saeurebad.de>
Reported-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Debugged-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Reviewed-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Tested-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Andrew Morton [Wed, 20 Aug 2008 21:09:14 +0000 (14:09 -0700)]
drivers/char/ipmi/ipmi_si_intf.c:default_find_bmc(): fix leak
If check_legacy_ioport() returns true, we leak *info.
Addresses http://bugzilla.kernel.org/show_bug.cgi?id=11362
Reported-by: Daniel Marjamki <danielm77@spray.se>
Cc: Christian Krafft <krafft@de.ibm.com>
Cc: Michael Ellerman <michael@ellerman.id.au>
Cc: Corey Minyard <minyard@acm.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Krzysztof Helt [Wed, 20 Aug 2008 21:09:11 +0000 (14:09 -0700)]
pm2fb: free cmap memory on module remove
Release cmap memory allocated in the probe function.
Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Atsushi Nemoto [Wed, 20 Aug 2008 21:09:11 +0000 (14:09 -0700)]
rtc: fix double lock on UIE emulation
With commit
5ad31a575157147b43fa84ef1e21471661653878 ("rtc: remove BKL
for ioctl()"), RTC_UIE_ON ioctl cause double lock on rtc->ops_lock.
The ops_lock must not be held while set_uie() calls rtc_read_time()
which takes the lock. Also clear_uie() does not need ops_lock. This
patch fixes return value of RTC_UIE_OFF ioctl too.
Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: David Brownell <david-b@pacbell.net>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Pavel Emelyanov [Wed, 20 Aug 2008 21:09:10 +0000 (14:09 -0700)]
binfmt_misc: fix false -ENOEXEC when coupled with other binary handlers
In case the binfmt_misc binary handler is registered *before* the e.g.
script one (when for example being compiled as a module) the following
situation may occur:
1. user launches a script, whose interpreter is a misc binary;
2. the load_misc_binary sets the misc_bang and returns -ENOEVEC,
since the binary is a script;
3. the load_script_binary loads one and calls for search_binary_hander
to run the interpreter;
4. the load_misc_binary is called again, but refuses to load the
binary due to misc_bang bit set.
The fix is to move the misc_bang setting lower - prior to the actual
call to the search_binary_handler.
Caused by the commit
3a2e7f47 (binfmt_misc.c: avoid potential kernel
stack overflow)
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Reported-by: Kirill A. Shutemov <kirill@shutemov.name>
Tested-by: Kirill A. Shutemov <kirill@shutemov.name>
Cc: <stable@kernel.org> [2.6.26.x]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Akinobu Mita [Wed, 20 Aug 2008 21:09:09 +0000 (14:09 -0700)]
brd: fix name argument of unregister_blkdev()
The name of brd block device is "ramdisk", it's not "brd".
(The block device is registered by register_blkdev(RAMDISK_MAJOR, "ramdisk")
So it should be unregistered by unregister_blkdev(RAMDISK_MAJOR, "ramdisk")
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Acked-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Sven Wegener [Wed, 20 Aug 2008 21:09:07 +0000 (14:09 -0700)]
nbd: fix memory leak of nbd_dev array
We leak the memory allocated for the nbd_dev array at multiple places.
Fix them by either adding a kfree() or by rearranging code to return
before we allocate the memory.
Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
Cc: Paul Clements <paul.clements@steeleye.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Marcin Slusarz [Wed, 20 Aug 2008 21:09:06 +0000 (14:09 -0700)]
mm: mminit_loglevel cannot be __meminitdata anymore
mminit_loglevel is now used from mminit_verify_zonelist <- build_all_zonelists <-
1. online_pages <- memory_block_action <- memory_block_change_state <- store_mem_state (sys handler)
2. numa_zonelist_order_handler (proc handler)
so it cannot be annotated __meminit - drop it
fixes following section mismatch warning:
WARNING: vmlinux.o(.text+0x71628): Section mismatch in reference from the function mminit_verify_zonelist() to the variable .meminit.data:mminit_loglevel
The function mminit_verify_zonelist() references
the variable __meminitdata mminit_loglevel.
This is often because mminit_verify_zonelist lacks a __meminitdata
annotation or the annotation of mminit_loglevel is wrong.
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Acked-by: Mel Gorman <mel@csn.ul.ie>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Hugh Dickins [Wed, 20 Aug 2008 21:09:05 +0000 (14:09 -0700)]
mm: show free swap as signed
Adjust <Alt><SysRq>m show_swap_cache_info() to show "Free swap" as a
signed long: the signed format is preferable, because during swapoff
nr_swap_pages can legitimately go negative, so makes more sense thus
(it used to be shown redundantly, once as signed and once as unsigned).
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Hugh Dickins [Wed, 20 Aug 2008 21:09:04 +0000 (14:09 -0700)]
mm: page_remove_rmap comments on PageAnon
Add a comment to s390's page_test_dirty/page_clear_dirty/page_set_dirty
dance in page_remove_rmap(): I was wrong to think the PageSwapCache test
could be avoided, and would like a comment in there to remind me. And
mention s390, to help us remember that this block is not really common.
Also move down the "It would be tidy to reset PageAnon" comment: it does
not belong to s390's block, and it would be unwise to reset PageAnon
before we're done with testing it.
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Acked-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Mike Frysinger [Wed, 20 Aug 2008 21:09:03 +0000 (14:09 -0700)]
Blackfin RTC Driver: dont let RTC programming in bootloaders randomly cause ~5 second boot delays
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Graf Yang [Wed, 20 Aug 2008 21:09:02 +0000 (14:09 -0700)]
Blackfin RTC Driver: BF561 not have on-chip RTC
Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Mike Frysinger [Wed, 20 Aug 2008 21:09:02 +0000 (14:09 -0700)]
Blackfin RTC Driver: do all initialization before we register the rtc and make it available
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Mike Frysinger [Wed, 20 Aug 2008 21:09:01 +0000 (14:09 -0700)]
Blackfin RTC Driver: move irq request/free out of open/release and into probe/remove so that the non-dev interfaces (like sysfs) work as expected
Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Clement Calmels [Wed, 20 Aug 2008 21:09:00 +0000 (14:09 -0700)]
/proc/self/maps doesn't display the real file offset
This addresses
http://bugzilla.kernel.org/show_bug.cgi?id=11318
In function show_map (file: fs/proc/task_mmu.c), if vma->vm_pgoff > 2^20
than (vma->vm_pgoff << PAGE_SIZE) is greater than 2^32 (with PAGE_SIZE
equal to 4096 (i.e. 2^12). The next seq_printf use an unsigned long for
the conversion of (vma->vm_pgoff << PAGE_SIZE), as a result the offset
value displayed in /proc/self/maps is truncated if the page offset is
greater than 2^20.
A test that shows this issue:
#define _GNU_SOURCE
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/mman.h>
#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
#include <string.h>
#define PAGE_SIZE (getpagesize())
#if __i386__
# define U64_STR "%llx"
#elif __x86_64
# define U64_STR "%lx"
#else
# error "Architecture Unsupported"
#endif
int main(int argc, char *argv[])
{
int fd;
char *addr;
off64_t offset = 0x10000000;
char *filename = "/dev/zero";
fd = open(filename, O_RDONLY);
if (fd < 0) {
perror("open");
return 1;
}
offset *= 0x10;
printf("offset = " U64_STR "\n", offset);
addr = (char*)mmap64(NULL, PAGE_SIZE, PROT_READ, MAP_PRIVATE, fd,
offset);
if ((void*)addr == MAP_FAILED) {
perror("mmap64");
return 1;
}
{
FILE *fmaps;
char *line = NULL;
size_t len = 0;
ssize_t read;
size_t filename_len = strlen(filename);
fmaps = fopen("/proc/self/maps", "r");
if (!fmaps) {
perror("fopen");
return 1;
}
while ((read = getline(&line, &len, fmaps)) != -1) {
if ((read > filename_len + 1)
&& (strncmp(&line[read - filename_len - 1], filename, filename_len) == 0))
printf("%s", line);
}
if (line)
free(line);
fclose(fmaps);
}
close(fd);
return 0;
}
[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Clement Calmels <cboulte@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Andreas Herrmann [Wed, 20 Aug 2008 21:08:58 +0000 (14:08 -0700)]
documentation: describe bootmem_debug kernel parameter
"bootmem_debug" is not mentioned in kernel-parameters.txt. Recently I
had to use that kernel option and I think it should be documented.
Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Johannes Weiner <hannes@saeurebad.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Matthew Garrett [Wed, 20 Aug 2008 21:08:57 +0000 (14:08 -0700)]
eeepc-laptop: fix use after free
eeepc-laptop uses the hwmon struct after unregistering the device, causing
an oops on module unload. Flip the ordering to fix.
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Cc: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Corentin Chary <corentincj@iksaif.net>
Cc: Karol Kozimor <sziwan@users.sourceforge.net>
Cc: <stable@kernel.org> [2.6.26.x]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
David Howells [Wed, 20 Aug 2008 15:04:22 +0000 (16:04 +0100)]
FRV: Provide ioremap_wc() for FRV
Provide ioremap_wc() for FRV.
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
David Howells [Wed, 20 Aug 2008 14:53:33 +0000 (15:53 +0100)]
MN10300: Supply ioremap_wc() for MN10300
Supply ioremap_wc() for MN10300.
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
David Woodhouse [Wed, 20 Aug 2008 13:58:23 +0000 (14:58 +0100)]
Reserve NFS fileid values for btrfs
Purely cosmetic for now, but we might as well get it merged ASAP.
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
David Woodhouse [Wed, 20 Aug 2008 13:44:45 +0000 (14:44 +0100)]
Reduce brokenness of CRIS headers_install
I won't say 'fix', because they still look broken, although this will at
least allow 'make ARCH=CRIS headers_install' to _complete_.
For headers which are exported, we should probably choose between
asm/arch-v10 and asm/arch-v32 by something that GCC defines -- we can't
rely on a generated symlink. And we certainly can't export an arch/
directory which doesn't even exist.
And the only thing that we seem to include from the arch/ directory is
<asm/arch/ptrace.h> from <asm/ptrace.h> ... and that isn't exported in
either arch-v10 or arch-v32 _anyway_.
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Wed, 20 Aug 2008 15:46:11 +0000 (08:46 -0700)]
Merge branch 'sh/for-2.6.27' of git://git./linux/kernel/git/lethal/sh-2.6
* 'sh/for-2.6.27' of git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6:
sh: Provide a FLAT_PLAT_INIT() definition.
binfmt_flat: Stub in a FLAT_PLAT_INIT().
video: export sh_mobile_lcdc panel size
sh: select memchunk size using kernel cmdline
sh: export sh7723 VEU as VEU2H
input: migor_ts compile and detection fix
sh: remove MSTPCR defines from Migo-R header file
sh: Update sh7763rdp defconfig
sh: Add support sh7760fb to sh7763rdp board
sh: Add support sh_eth to sh7763rdp board
sh: Disable 64kB hugetlbpage size when using 64kB PAGE_SIZE.
sh: Don't export __{s,u}divsi3_i4i from SH-2 libgcc.
fix SH7705_CACHE_32KB compilation
sh: mach-x3proto: Fix up smc91x platform data.
Linus Torvalds [Wed, 20 Aug 2008 15:44:33 +0000 (08:44 -0700)]
Merge branch 'merge' of git://git./linux/kernel/git/paulus/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc:
powerpc: Fix vio_bus_probe oops on probe error
powerpc/ibmebus: Restore "name" sysfs attribute on ibmebus devices
powerpc: Fix /dev/oldmem interface for kdump
powerpc/spufs: Remove invalid semicolon after if statement
powerpc/spufs: reference context while dropping state mutex in scheduler
powerpc/spufs: fix npc setting for NOSCHED contexts
Linus Torvalds [Wed, 20 Aug 2008 15:43:47 +0000 (08:43 -0700)]
Merge branch 'tracehook' of git://git./linux/kernel/git/frob/linux-2.6-utrace
* 'tracehook' of git://git.kernel.org/pub/scm/linux/kernel/git/frob/linux-2.6-utrace:
tracehook: fix SA_NOCLDWAIT
Linus Torvalds [Wed, 20 Aug 2008 15:42:53 +0000 (08:42 -0700)]
Merge git://git./linux/kernel/git/jejb/scsi-rc-fixes-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6: (22 commits)
[SCSI] ibmvfc: Driver version 1.0.2
[SCSI] ibmvfc: Add details to async event log
[SCSI] ibmvfc: Sanitize response lengths
[SCSI] ibmvfc: Fix for lost async events
[SCSI] ibmvfc: Fixup host state during reinit
[SCSI] ibmvfc: Fix another hang on module removal
[SCSI] ibmvscsi: Fixup desired DMA value for shared memory partitions
[SCSI] megaraid_sas: remove sysfs dbg_lvl world writeable permissions
[SCSI] qla2xxx: Update version number to 8.02.01-k7.
[SCSI] qla2xxx: Explicitly tear-down vports during PCI remove_one().
[SCSI] qla2xxx: Reference proper ha during SBR handling.
[SCSI] qla2xxx: Set npiv_supported flag for FCoE HBAs.
[SCSI] qla2xxx: Don't leak SG-DMA mappings while aborting commands.
[SCSI] qla2xxx: Correct vport-state management issues during ISP-ABORT.
[SCSI] qla2xxx: Correct synchronization of software/firmware fcport states.
[SCSI] scsi_dh: Initialize lun_state in check_ownership()
[SCSI] scsi_dh: Do not use scsilun in rdac hardware handler
[SCSI] megaraid_sas: version and Documentation Update
[SCSI] megaraid_sas: add new controllers (0x78 0x79)
[SCSI] megaraid_sas: add the shutdown DCMD cmd to driver shutdown routine
...
Linus Torvalds [Wed, 20 Aug 2008 15:31:19 +0000 (08:31 -0700)]
vfat: fix 'sync' mount deadlock due to BKL->lock_super conversion
There was another FAT BKL conversion deadlock reported by Bart
Trojanowski due to the BKL being used as a recursive lock by FAT, which
was missed because it only triggers with 'sync' (or 'dirsync') mounts.
The recursion worked for the BKL, but after the conversion to lock_super
(which uses a mutex), it just deadlocks.
Thanks to Bart for debugging this and testing the fix. The lock
debugging information from the original report:
=============================================
[ INFO: possible recursive locking detected ]
2.6.27-rc3-bisect-00448-ga7f5aaf #16
---------------------------------------------
mv/4020 is trying to acquire lock:
(&type->s_lock_key#9){--..}, at: [<
c01a90fe>] lock_super+0x1e/0x20
but task is already holding lock:
(&type->s_lock_key#9){--..}, at: [<
c01a90fe>] lock_super+0x1e/0x20
other info that might help us debug this:
3 locks held by mv/4020:
#0: (&sb->s_type->i_mutex_key#9/1){--..}, at: [<
c01b2336>] do_unlinkat+0x66/0x140
#1: (&sb->s_type->i_mutex_key#9){--..}, at: [<
c01b0954>] vfs_unlink+0x84/0x110
#2: (&type->s_lock_key#9){--..}, at: [<
c01a90fe>] lock_super+0x1e/0x20
stack backtrace:
Pid: 4020, comm: mv Not tainted
2.6.27-rc3-bisect-00448-ga7f5aaf #16
[<
c014e694>] validate_chain+0x984/0xea0
[<
c0108d70>] ? native_sched_clock+0x0/0xf0
[<
c014ee9c>] __lock_acquire+0x2ec/0x9b0
[<
c014f5cf>] lock_acquire+0x6f/0x90
[<
c01a90fe>] ? lock_super+0x1e/0x20
[<
c044e5fd>] mutex_lock_nested+0xad/0x300
[<
c01a90fe>] ? lock_super+0x1e/0x20
[<
c01a90fe>] ? lock_super+0x1e/0x20
[<
c01a90fe>] lock_super+0x1e/0x20
[<
f8b3a700>] fat_write_inode+0x60/0x2b0 [fat]
[<
c0450878>] ? _spin_unlock_irqrestore+0x48/0x80
[<
f8b3a953>] ? fat_sync_inode+0x3/0x20 [fat]
[<
f8b3a962>] fat_sync_inode+0x12/0x20 [fat]
[<
f8b37c7e>] fat_remove_entries+0xbe/0x120 [fat]
[<
f8b422ef>] vfat_unlink+0x5f/0x90 [vfat]
[<
f8b42290>] ? vfat_unlink+0x0/0x90 [vfat]
[<
c01b0968>] vfs_unlink+0x98/0x110
[<
c01b2400>] do_unlinkat+0x130/0x140
[<
c016a8f5>] ? audit_syscall_entry+0x105/0x150
[<
c01b253b>] sys_unlinkat+0x3b/0x40
[<
c01040d3>] sysenter_do_call+0x12/0x3f
=======================
where the deadlock is due to the nesting of lock_super from vfat_unlink
to fat_write_inode:
- do_unlinkat
- vfs_unlink
- vfat_unlink
* lock_super
- fat_remove_entries
- fat_sync_inode
- fat_write_inode
* lock_super
and the fix is to simply remove the use of lock_super() in fat_write_inode.
The lock_super() there had been just an automatic conversion of the
kernel lock to the superblock lock, but no locking was actually needed
there, since the code in fat_write_inode already protected all relevant
accesses with a spinlock (sbi->inode_hash_lock to be exact). The only
code inside the BKL (and thus the superblock lock) was accesses tp local
variables or calls to functions that have long been SMP-safe (i.e.
sb_bread, mark_buffe_dirty and brlese).
Bart reports:
"Looks good. I ran 10 parallel processes creating 1M files truncating
them, writing to them again and then deleting them. This patch fixes
the issue I ran into.
Signed-off-by: Bart Trojanowski <bart@jukie.net>"
Reported-and-tested-by: Bart Trojanowski <bart@jukie.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Roland McGrath [Wed, 20 Aug 2008 03:37:07 +0000 (20:37 -0700)]
tracehook: fix SA_NOCLDWAIT
I outwitted myself again in commit
2b2a1ff64afbadac842bbc58c5166962cf4f7664,
and broke the SA_NOCLDWAIT behavior so it leaks zombies. This fixes it.
Reported-by: Andi Kleen <andi@firstfloor.org>
Signed-off-by: Roland McGrath <roland@redhat.com>
Brian King [Tue, 12 Aug 2008 19:21:45 +0000 (05:21 +1000)]
powerpc: Fix vio_bus_probe oops on probe error
When CMO is enabled and booted on a non CMO system and the VIO
device's probe function fails, an oops can result since
vio_cmo_bus_remove is called when it should not. This fixes it by
avoiding the vio_cmo_bus_remove call on platforms that don't implement
CMO.
cpu 0x0: Vector: 300 (Data Access) at [
c00000000e13b3d0]
pc:
c000000000020d34: .vio_cmo_bus_remove+0xc0/0x1f4
lr:
c000000000020ca4: .vio_cmo_bus_remove+0x30/0x1f4
sp:
c00000000e13b650
msr:
8000000000009032
dar: 0
dsisr:
40000000
current = 0xc00000000e0566c0
paca = 0xc0000000006f9b80
pid = 2428, comm = modprobe
enter ? for help
[
c00000000e13b6e0]
c000000000021d94 .vio_bus_probe+0x2f8/0x33c
[
c00000000e13b7a0]
c00000000029fc88 .driver_probe_device+0x13c/0x200
[
c00000000e13b830]
c00000000029fdac .__driver_attach+0x60/0xa4
[
c00000000e13b8c0]
c00000000029f050 .bus_for_each_dev+0x80/0xd8
[
c00000000e13b980]
c00000000029f9ec .driver_attach+0x28/0x40
[
c00000000e13ba00]
c00000000029f630 .bus_add_driver+0xd4/0x284
[
c00000000e13baa0]
c0000000002a01bc .driver_register+0xc4/0x198
[
c00000000e13bb50]
c00000000002168c .vio_register_driver+0x40/0x5c
[
c00000000e13bbe0]
d0000000003b3f1c .ibmvfc_module_init+0x70/0x109c [ibmvfc]
[
c00000000e13bc70]
c0000000000acf08 .sys_init_module+0x184c/0x1a10
[
c00000000e13be30]
c000000000008748 syscall_exit+0x0/0x40
Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Joachim Fenkes [Tue, 5 Aug 2008 14:30:18 +0000 (00:30 +1000)]
powerpc/ibmebus: Restore "name" sysfs attribute on ibmebus devices
Recent of_platform changes made of_bus_type_init() overwrite the bus
type's .dev_attrs list, meaning that the "name" attribute that ibmebus
devices previously had is no longer present. This is a user-visible
regression which breaks the userspace eHCA support, since the eHCA
userspace driver relies on the name attribute to check for valid
adapters.
This fixes it by providing the "name" attribute in the generic OF
device code instead. Tested on POWER.
Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Michael Ellerman [Thu, 31 Jul 2008 06:54:28 +0000 (16:54 +1000)]
powerpc: Fix /dev/oldmem interface for kdump
A change to __ioremap() broke reading /dev/oldmem because we're no
longer able to ioremap pfn 0 (
d177c207, "[PATCH] powerpc: IOMMU: don't
ioremap null addresses").
We actually don't need to ioremap for anything that's part of the linear
mapping, so just read it directly.
Also make sure we're only reading one page or less at a time.
Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Sachin Sant <sachinp@in.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Paul Mackerras [Tue, 19 Aug 2008 23:18:20 +0000 (09:18 +1000)]
Merge branch 'merge' of git://git./linux/kernel/git/jk/spufs into merge
Linus Torvalds [Tue, 19 Aug 2008 20:56:21 +0000 (13:56 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/ieee1394/linux1394-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
firewire: Kconfig help update
ieee1394: sbp2: let nodemgr retry node updates during bus reset series
ieee1394: don't drop nodes during bus reset series
ieee1394: regression in 2.6.25: updates should happen before probes
Linus Torvalds [Tue, 19 Aug 2008 20:55:47 +0000 (13:55 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jbarnes/pci-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
PCI: add acpi_find_root_bridge_handle
PCI: acpi_pcihp: run _OSC on a root bridge
x86/PCI: irq and pci_ids patch for Intel Ibex Peak PCHs
x86/PCI: allow scanning of 255 PCI busses
x86, pci: detect end_bus_number according to acpi/e820 reserved, v2
pci: debug extra pci bus resources
pci: debug extra pci resources range
Linus Torvalds [Tue, 19 Aug 2008 20:34:59 +0000 (13:34 -0700)]
Revert "[CPUFREQ][2/2] preregister support for powernow-k8"
This reverts commit
34ae7f35a21694aa5cb8829dc5142c39d73d6ba0, which has
been reported to cause a number of problems. During suspend and resume,
it apparently causes a crash in a CPU hotplug notifier to happen,
although the exact details are sketchy because of the inability to get
good traces during the suspend sequence.
See buzilla entries
http://bugzilla.kernel.org/show_bug.cgi?id=11296
http://bugzilla.kernel.org/show_bug.cgi?id=11339
for more examples and details.
[ Mark: "Revert the patch for now. I'm still looking into getting a
reliable reproduction and I do not have a fix at this time." ]
Requested-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Mark Langsdorf <mark.langsdorf@amd.com>
Acked-by: Dave Jones <davej@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@inux-foundation.org>
Linus Torvalds [Tue, 19 Aug 2008 20:34:33 +0000 (13:34 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: evdev - fix printf() format for sizeof
Input: remove version.h from drivers that don't need it
Input: cobalt_btns - add missing MODULE_LICENSE
Linus Torvalds [Tue, 19 Aug 2008 16:59:02 +0000 (09:59 -0700)]
Merge git://git./linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (94 commits)
pkt_sched: Prevent livelock in TX queue running.
Revert "pkt_sched: Add BH protection for qdisc_stab_lock."
Revert "pkt_sched: Protect gen estimators under est_lock."
pkt_sched: remove bogus block (cleanup)
nf_nat: use secure_ipv4_port_ephemeral() for NAT port randomization
netfilter: ctnetlink: sleepable allocation with spin lock bh
netfilter: ctnetlink: fix sleep in read-side lock section
netfilter: ctnetlink: fix double helper assignation for NAT'ed conntracks
netfilter: ipt_addrtype: Fix matching of inverted destination address type
dccp: Fix panic caused by too early termination of retransmission mechanism
pkt_sched: Don't hold qdisc lock over qdisc_destroy().
pkt_sched: Add lockdep annotation for qdisc locks
pkt_sched: Never schedule non-root qdiscs.
removed unused #include <version.h>
rt2x00: Fix txdone_entry_desc_flags
b43: Fix for another Bluetooth Coexistence SPROM Programming error for BCM4306
mac80211: remove kdoc references to IEEE80211_HW_HOST_GEN_BEACON_TEMPLATE
p54u: reset skb's data/tail pointer on requeue
p54: move p54_vdcf_init to the right place.
iwlwifi: fix printk newlines
...
Stefan Richter [Sat, 16 Aug 2008 19:52:28 +0000 (21:52 +0200)]
firewire: Kconfig help update
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Stefan Richter [Sat, 16 Aug 2008 11:39:26 +0000 (13:39 +0200)]
ieee1394: sbp2: let nodemgr retry node updates during bus reset series
sbp2 was too quick to report .update() to the ieee1394 core as failed.
(Logged as "Failed to reconnect to sbp2 device!".) The core would then
unbind sbp2 from the device.
This is not justified if the .update() failed because another bus reset
happened. We check this and tell the ieee1394 that .update() succeeded,
and the core will call sbp2's .update() for the new bus reset as well.
This improves reconnection/re-login especially on buses with several
disks as they may issue bus resets in close succession when they come
online.
Tested by Damien Benoist.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Stefan Richter [Sat, 16 Aug 2008 11:38:11 +0000 (13:38 +0200)]
ieee1394: don't drop nodes during bus reset series
nodemgr_node_probe checked for generation increments too late and
therefore prematurely reported nodes as "suspended".
Fixes http://bugzilla.kernel.org/show_bug.cgi?id=11349. Reported and
tested by Damien Benoist.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Stefan Richter [Sat, 16 Aug 2008 11:36:47 +0000 (13:36 +0200)]
ieee1394: regression in 2.6.25: updates should happen before probes
Regression since commit
73cf60232ef16e1f8a64defa97214a1722db1e6c,
"ieee1394: use class iteration api": The two loops for (1.) driver
updates and (2.) driver probes were replaced by a single loop with
bogus needs_probe checks. Hence updates and probes were now intermixed,
and especially sbp2 updates (reconnects) held up longer than necessary.
While we fix it, change the needs_probe flag to bool type for clarity.
Tested by Damien Benoist.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Geert Uytterhoeven [Tue, 19 Aug 2008 15:28:23 +0000 (11:28 -0400)]
Input: evdev - fix printf() format for sizeof
commit
f2afa7711f8585ffc088ba538b9a510e0d5dca12 ("Input: paper over a bug in
Synaptics X driver") introduced a compiler warning on 64-bit platforms, as
sizeof() returns a size_t, not an (unsigned) int:
| drivers/input/evdev.c: In function 'handle_eviocgbit':
| drivers/input/evdev.c:684: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'
Use the proper `z' modifier for size_t, and make the printf() formats for the
sizes unsigned while we're at it.
Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Ilpo Järvinen [Tue, 19 Aug 2008 05:48:57 +0000 (08:48 +0300)]
powerpc/spufs: Remove invalid semicolon after if statement
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
David S. Miller [Tue, 19 Aug 2008 11:00:36 +0000 (04:00 -0700)]
pkt_sched: Prevent livelock in TX queue running.
If dev_deactivate() is trying to quiesce the queue, it
is theoretically possible for another cpu to livelock
trying to process that queue. This happens because
dev_deactivate() grabs the queue spinlock as it checks
the queue state, whereas net_tx_action() does a trylock
and reschedules the qdisc if it hits the lock.
This breaks the livelock by adding a check on
__QDISC_STATE_DEACTIVATED to net_tx_action() when
the trylock fails.
Based upon feedback from Herbert Xu and Jarek Poplawski.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Tue, 19 Aug 2008 08:33:25 +0000 (01:33 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/holtmann/bluetooth-2.6
David S. Miller [Tue, 19 Aug 2008 05:33:05 +0000 (22:33 -0700)]
Revert "pkt_sched: Add BH protection for qdisc_stab_lock."
This reverts commit
1cfa26661a85549063e369e2b40275eeaa7b923c.
qdisc_destroy() runs fully under RTNL again and not from softint any
longer, so this change is no longer needed.
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Tue, 19 Aug 2008 05:32:10 +0000 (22:32 -0700)]
Revert "pkt_sched: Protect gen estimators under est_lock."
This reverts commit
d4766692e72422f3b0f0e9ac6773d92baad07d51.
qdisc_destroy() now runs in RTNL fully again, so this
change is no longer needed.
Signed-off-by: David S. Miller <davem@davemloft.net>
Ilpo Järvinen [Tue, 19 Aug 2008 05:30:01 +0000 (22:30 -0700)]
pkt_sched: remove bogus block (cleanup)
...Last block local var got just deleted.
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stephen Hemminger [Tue, 19 Aug 2008 04:32:32 +0000 (21:32 -0700)]
nf_nat: use secure_ipv4_port_ephemeral() for NAT port randomization
Use incoming network tuple as seed for NAT port randomization.
This avoids concerns of leaking net_random() bits, and also gives better
port distribution. Don't have NAT server, compile tested only.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
[ added missing EXPORT_SYMBOL_GPL ]
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Pablo Neira Ayuso [Tue, 19 Aug 2008 04:31:46 +0000 (21:31 -0700)]
netfilter: ctnetlink: sleepable allocation with spin lock bh
This patch removes a GFP_KERNEL allocation while holding a spin lock with
bottom halves disabled in ctnetlink_change_helper().
This problem was introduced in 2.6.23 with the netfilter extension
infrastructure.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Pablo Neira Ayuso [Tue, 19 Aug 2008 04:31:24 +0000 (21:31 -0700)]
netfilter: ctnetlink: fix sleep in read-side lock section
Fix allocation with GFP_KERNEL in ctnetlink_create_conntrack() under
read-side lock sections.
This problem was introduced in 2.6.25.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Pablo Neira Ayuso [Tue, 19 Aug 2008 04:30:55 +0000 (21:30 -0700)]
netfilter: ctnetlink: fix double helper assignation for NAT'ed conntracks
If we create a conntrack that has NAT handlings and a helper, the helper
is assigned twice. This happens because nf_nat_setup_info() - via
nf_conntrack_alter_reply() - sets the helper before ctnetlink, which
indeed does not check if the conntrack already has a helper as it thinks that
it is a brand new conntrack.
The fix moves the helper assignation before the set of the status flags.
This avoids a bogus assertion in __nf_ct_ext_add (if netfilter assertions are
enabled) which checks that the conntrack must not be confirmed.
This problem was introduced in 2.6.23 with the netfilter extension
infrastructure.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Anders Grafström [Tue, 19 Aug 2008 04:29:57 +0000 (21:29 -0700)]
netfilter: ipt_addrtype: Fix matching of inverted destination address type
This patch fixes matching of inverted destination address type.
Signed-off-by: Anders Grafström <grfstrm@users.sourceforge.net>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Tue, 19 Aug 2008 04:15:44 +0000 (21:15 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-2.6
Gerrit Renker [Tue, 19 Aug 2008 04:14:20 +0000 (21:14 -0700)]
dccp: Fix panic caused by too early termination of retransmission mechanism
Thanks is due to Wei Yongjun for the detailed analysis and description of this
bug at http://marc.info/?l=dccp&m=
121739364909199&w=2
The problem is that invalid packets received by a client in state REQUEST cause
the retransmission timer for the DCCP-Request to be reset. This includes freeing
the Request-skb ( in dccp_rcv_request_sent_state_process() ). As a consequence,
* the arrival of further packets cause a double-free, triggering a panic(),
* the connection then may hang, since further retransmissions are blocked.
This patch changes the order of statements so that the retransmission timer is
reset, and the pending Request freed, only if a valid Response has arrived (or
the number of sysctl-retries has been exhausted).
Further changes:
----------------
To be on the safe side, replaced __kfree_skb with kfree_skb so that if due to
unexpected circumstances the sk_send_head is NULL the WARN_ON is used instead.
Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Tue, 19 Aug 2008 04:03:15 +0000 (21:03 -0700)]
pkt_sched: Don't hold qdisc lock over qdisc_destroy().
Based upon reports by Denys Fedoryshchenko, and feedback
and help from Jarek Poplawski and Herbert Xu.
We always either:
1) Never made an external reference to this qdisc.
or
2) Did a dev_deactivate() which purged all asynchronous
references.
So do not lock the qdisc when we call qdisc_destroy(),
it's illegal anyways as when we drop the lock this is
free'd memory.
Signed-off-by: David S. Miller <davem@davemloft.net>
Jarek Poplawski [Tue, 19 Aug 2008 03:53:34 +0000 (20:53 -0700)]
pkt_sched: Add lockdep annotation for qdisc locks
Qdisc locks are initialized in the same function, qdisc_alloc(), so
lockdep can't distinguish tx qdisc lock from rx and reports "possible
recursive locking detected" when both these locks are taken eg. while
using act_mirred with ifb. This looks like a false positive. Anyway,
after this patch these locks will be reported more exactly.
Reported-by: Denys Fedoryshchenko <denys@visp.net.lb>
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Tue, 19 Aug 2008 03:51:18 +0000 (20:51 -0700)]
pkt_sched: Never schedule non-root qdiscs.
Based upon initial discovery and patch by Jarek Poplawski.
The qdisc watchdogs can be attached to any qdisc, not just the root,
so make sure we schedule the correct one.
CBQ has a similar bug.
Signed-off-by: David S. Miller <davem@davemloft.net>
Linus Torvalds [Tue, 19 Aug 2008 00:43:21 +0000 (17:43 -0700)]
Merge branch 'release' of git://git./linux/kernel/git/aegl/linux-2.6
* 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6:
[IA64] use generic compat_old_sys_readdir
[IA64] pci_acpi_scan_root cleanup
[IA64] Shrink shadow_flush_counts to a short array to save 8k of per_cpu area.
[IA64] Remove sn2_defconfig.
Linus Torvalds [Tue, 19 Aug 2008 00:40:13 +0000 (17:40 -0700)]
Merge git://git./linux/kernel/git/bart/ide-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/bart/ide-2.6:
ata: add missing ATA_* defines
ata: add missing ATA_CMD_* defines
ata: add missing ATA_ID_* defines (take 2)
sgiioc4: fixup message on resource allocation failure
ide-cd: use bcd2bin/bin2bcd
cdrom: handle TOC
gdrom: add dummy audio_ioctl handler
viocd: add dummy audio ioctl handler
cleanup powerpc/include/asm/ide.h
drivers/ide/pci/: use __devexit_p()
Jesse Barnes [Tue, 19 Aug 2008 00:23:24 +0000 (17:23 -0700)]
Merge branch 'x86-merge' into for-linus
Christoph Hellwig [Sat, 16 Aug 2008 17:50:28 +0000 (19:50 +0200)]
[IA64] use generic compat_old_sys_readdir
Switch ia64 to the generic compat_sys_old_readdir which is identical
except for slightly better error handling. Also remove sys32_getdents
which already isn't wired up to the syscall table anymore in favour of
compat_sys_getdents.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Luck, Tony [Fri, 15 Aug 2008 22:37:48 +0000 (15:37 -0700)]
[IA64] pci_acpi_scan_root cleanup
The code walks all the acpi _CRS methods to see how many windows
to allocate. It then scans them all again to insert_resource()
for each *even if the first scan found that there were none*.
Move the second scan inside the "if (windows)" clause.
Signed-off-by: Tony Luck <tony.luck@intel.com>
Robin Holt [Fri, 15 Aug 2008 14:21:24 +0000 (09:21 -0500)]
[IA64] Shrink shadow_flush_counts to a short array to save 8k of per_cpu area.
Making allmodconfig will break the current build. This patch shrinks
the per_cpu__shadow_flush_counts from 16k to 8k which frees enough space
to allow allmodconfig to successfully complete.
Fixes http://bugzilla.kernel.org/show_bug.cgi?id=11338
Signed-off-by: Robin Holt <holt@sgi.com>
Acked-by: Jack Steiner <steiner@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Robin Holt [Fri, 15 Aug 2008 09:56:01 +0000 (04:56 -0500)]
[IA64] Remove sn2_defconfig.
Not really a patch as much as a remove this file request. Now that
generic_defconfig supports all the configurations SGI currently supports
and has NR_CPUS and NR_NODES at our largest configurations, we have no
reason to maintain the extra defconfig file.
Signed-off-by: Robin Holt <holt@sgi.com>
Acked-by: Jack Steiner <steiner@sgi.com>
Signed-off-by: Jes Sorensen <jes@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
Jiri Slaby [Mon, 18 Aug 2008 18:22:54 +0000 (20:22 +0200)]
PCI: add acpi_find_root_bridge_handle
Consolidate finding of a root bridge and getting its handle to the one
inline function. It's cut & pasted on multiple places. Use this new
inline in those.
Cc: kristen.c.accardi@intel.com
Acked-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Jiri Slaby [Mon, 11 Aug 2008 15:47:40 +0000 (17:47 +0200)]
PCI: acpi_pcihp: run _OSC on a root bridge
_OSC should be ran on a root bridge instead of the device itself. Do
this before touching OSHP since PCI fw specs states that _OSC should be
preferred over OSHP (however if the device has OSHP but not _OSC -- not
a root bridge -- it's not).
Cc: kristen.c.accardi@intel.com
Acked-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Bartlomiej Zolnierkiewicz [Mon, 18 Aug 2008 19:40:05 +0000 (21:40 +0200)]
ata: add missing ATA_* defines
Add missing ATA_* defines to <linux/ata.h>. Also add
ATAPI_{LFS,EOM,ILI,IO,CODE} defines while at it.
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Bartlomiej Zolnierkiewicz [Mon, 18 Aug 2008 19:40:05 +0000 (21:40 +0200)]
ata: add missing ATA_CMD_* defines
Add missing ATA_CMD_* defines to <linux/ata.h>. Also add
ATA_EXABYTE_ENABLE_NEST, SETFEATURES_AAM_* and ATA_SMART_*
defines while at it.
Partially based on earlier work by Chris Wedgwood.
Acked-by: Chris Wedgwood <cw@f00f.org>
Acked-by: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Bartlomiej Zolnierkiewicz [Mon, 18 Aug 2008 19:40:05 +0000 (21:40 +0200)]
ata: add missing ATA_ID_* defines (take 2)
Add missing ATA_ID_* defines and update {ata,atapi}_*()
inlines accordingly. The currently unused defines are
needed for the forthcoming drivers/ide/ changes.
v2:
Add ATA_ID_SPG.
Acked-by: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Bartlomiej Zolnierkiewicz [Mon, 18 Aug 2008 19:40:04 +0000 (21:40 +0200)]
sgiioc4: fixup message on resource allocation failure
There can be more than one sgiioc4 card in the system so print
also PCI device name on resource allocation failure (so we know
which one is the problematic one).
Reported-by: Jeremy Higdon <jeremy@sgi.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Adrian Bunk [Mon, 18 Aug 2008 19:40:04 +0000 (21:40 +0200)]
ide-cd: use bcd2bin/bin2bcd
Change ide-cd to use the new bcd2bin/bin2bcd functions instead of the
obsolete BCD2BIN/BIN2BCD macros.
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Acked-by: Borislav Petkov <petkovbb@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Alexander Inyukhin [Mon, 18 Aug 2008 19:40:04 +0000 (21:40 +0200)]
cdrom: handle TOC
This patch should fix TOC handling for cdroms that can not play audio. It
extends commit
af744e3294d09d706c4eae26cffaaa68a8d40337 ("cdrom: don't
check CDC_PLAY_AUDIO in cdrom_count_tracks()") with a safety check and
non-audio ioctls support.
Since CDC_PLAY_AUDIO flag was used not only to check ability to play audio
but also to ensure that audio_ioctl was not NULL, all TOC-related
operations had to use it.
As far as I understand, now audio_ioctl is never NULL, so a sanity check
during device registration should be sufficient.
It was tested on Optiarc
AD7203A device, that has no ability to play
audio.
Cc: Tejun Heo <tj@kernel.org>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: Borislav Petkov <petkovbb@googlemail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
[bart: remove now unneeded ->audio_ioctl check (noticed by Borislav)]
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Borislav Petkov [Mon, 18 Aug 2008 19:40:04 +0000 (21:40 +0200)]
gdrom: add dummy audio_ioctl handler
Make sure audio_ioctl is always defined even if being a dummy function
since the cdrom_ioctl interface assumes its existence and we don't
want to BUG on null ptr on some ioctls like, e.g. CDROMREADTOCENTRY,
CDROMREADTOCHDR etc. when we fix CDC_PLAY_AUDIO checking in cdrom.c.
Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Acked-by: Adrian McMenamin <adrian@mcmen.demon.co.uk>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Borislav Petkov [Mon, 18 Aug 2008 19:40:03 +0000 (21:40 +0200)]
viocd: add dummy audio ioctl handler
Make sure audio_ioctl is always defined even if being a dummy function
since the cdrom_ioctl interface assumes its existence and we don't
want to BUG on null ptr on some ioctls like, e.g. CDROMREADTOCENTRY,
CDROMREADTOCHDR etc. when we fix CDC_PLAY_AUDIO checking in cdrom.c.
Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
Acked-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Adrian Bunk [Mon, 18 Aug 2008 19:40:03 +0000 (21:40 +0200)]
cleanup powerpc/include/asm/ide.h
This patch removes code that became unused through IDE changes and the
arch/ppc/ removal.
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Adrian Bunk [Mon, 18 Aug 2008 19:40:03 +0000 (21:40 +0200)]
drivers/ide/pci/: use __devexit_p()
This patch adds missing __devexit_p's.
Reported-by: Russell King <rmk+lkml@arm.linux.org.uk>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>