View Single Post
Posts: 268 | Thanked: 1,053 times | Joined on May 2010 @ The Netherlands
#376
Originally Posted by dvb View Post
Greetings!

Busybox-power has support for swapon priority by specifying -p switch, but it doesn't respect fstab "pri=n" option. On the contrary, Debian swapon utility behaves as it should, setting the specified priority...

Should I file that in on bugs.busybox.net as a suggestion or it's a bug of our package? I didn't find any occurence of reading of that option from fstab in official sources of busybox v1.21, but I could just miss that.
Hi and thanks for reporting!

This was indeed not implemented in BusyBox' swapon yet. Whilst swapon did accept the -p flag, it didn't respect pri=n when enabling all swap spaces from /etc/fstab. This could be filed at BusyBox' bugzilla as an enhancement request.

But I'm glad you posted here first . I've created a small patch to make swapon adhere pri=n from fstab (attached to this post). The patch will be sent upstream later.

Here's a deb of busybox-power with the patch already applied. Unfortunately, it was too big to be attached to this post, so had to upload it elsewhere: *click* (md5sum: f8a040cf717cff990fa727e6632994e0)

Could you please verify that it works correctly on your device? Don't worry, I tested it as well.

With the patched busybox-power installed:
Code:
Nokia-N900:~# cat /etc/fstab | grep sw
/dev/mmcblk1p3 none swap sw,pri=50 0 0
/dev/mmcblk1p4 none swap sw,pri=40 0 0
Nokia-N900:~# cat /proc/swaps
Filename				Type		Size	Used	Priority
/dev/mmcblk1p3                          partition	786424	0	50
/dev/mmcblk1p4                          partition	785400	0	40
Attached Files
File Type: txt 0001-swapon-adhere-swap-priority-in-fstab.patch.txt (1.3 KB, 109 views)
 

The Following 5 Users Say Thank You to iDont For This Useful Post: