Re: kern/159281: [PATCH] Linux-like /proc/swaps for linprocfs

2011-08-02 Thread Robert Millan
2011/7/31 Kostik Belousov : > Below is the hopefully final patch after Bruce Evans' comments incorporated. > If nobody speaks, I will send this to re tomorrow. I notice it's been committed already, and tested latest HEAD. It's working fine, thank you! -- Robert Millan __

Re: kern/159281: [PATCH] Linux-like /proc/swaps for linprocfs

2011-07-31 Thread Kostik Belousov
On Sun, Jul 31, 2011 at 06:56:51PM +0200, Robert Millan wrote: > 2011/7/30 Kostik Belousov : > > Second, my proposal contains a flaw. Namely, if some swap device was removed > > between calls to swap_info and swap_devname calls, we get mangled list. > > Ok, I see that you fixed this by unifying th

Re: kern/159281: [PATCH] Linux-like /proc/swaps for linprocfs

2011-07-31 Thread Robert Millan
2011/7/30 Kostik Belousov : > Second, my proposal contains a flaw. Namely, if some swap device was removed > between calls to swap_info and swap_devname calls, we get mangled list. Ok, I see that you fixed this by unifying those functions. > The third problem, which is not fixed, and which I do n

Re: kern/159281: [PATCH] Linux-like /proc/swaps for linprocfs

2011-07-30 Thread Kostik Belousov
On Sat, Jul 30, 2011 at 01:06:48AM +0200, Robert Millan wrote: > Hi Kostik, > > 2011/7/29 Kostik Belousov : > > The patch is too hackish, IMHO. > > I would prefer to have an exported kernel function that fills xswdev > > by index, used both by vm_swap_info and linprocfs. > > > > For the device nam

Re: kern/159281: [PATCH] Linux-like /proc/swaps for linprocfs

2011-07-29 Thread Robert Millan
Hi Kostik, 2011/7/29 Kostik Belousov : > The patch is too hackish, IMHO. > I would prefer to have an exported kernel function that fills xswdev > by index, used both by vm_swap_info and linprocfs. > > For the device name, you would use sw_vp->v_rdev->si_name, see, for > instance, the following fra

[PATCH] Linux-like /proc/swaps for linprocfs

2011-07-28 Thread Robert Millan
Please consider this patch, it implements Linux-like /proc/swaps for linprocfs. E.g. $ cat /proc/swaps FilenameTypeSizeUsedPriority /dev/zvol/dimoni/swap unknown 2097152 0 -1 -- Robert Millan --- a/sys/compat/li

Re: [PATCH] Linux-like /proc/swaps for linprocfs

2011-07-28 Thread Kostik Belousov
On Fri, Jul 29, 2011 at 01:15:59AM +0200, Robert Millan wrote: > Please consider this patch, it implements Linux-like /proc/swaps for > linprocfs. > > E.g. > > $ cat /proc/swaps > FilenameTypeSizeUsed > Priority > /dev/zvol/dimoni/swap