swapfs fixes against and comments on ac9
Subsystems (4)
PATCH 1/1 swapfs fixes against and comments on ac9
Hi Alan,
Here comes a patch for swapfs which has all my fixes against -ac9. It does the following:
- Fix IPC_LOCK (also in 2.4.1-pre7)
- Do accounting right (Also send to Linus)
- memparse returns unsigned long long (Also send to Linus)
- Fix the unresolved symbols w/o CONFIG_SWAPFS
- Introduce size parameter and let nr_blocks and nr_inodes use memparse
- fix some size limit/truncate bugs
- fix write support on highmem machines
- set sb_maxbytes in superblock for ac kernel (Alan, wouldn't it be better to do this in blocks instead of bytes?)
No, I did not change the name again yet. I tend to change it to "tmpfs". It's not as nice as "vmfs" but the admins will know it. But I will wait some more until changing that.
Greetings
Christoph
arch/i386/kernel/setup.c +1 -1
@@ -558,7 +558,7 @@* blow away any automatically generated * size */ -unsigned long start_at, mem_size; +unsigned long long start_at, mem_size;if (usermem ==0 ) {/* first time in: zap the whitelist
include/linux/kernel.h +1 -1
@@ -62,7 +62,7 @@extern int vsprintf (char *buf,const char *,va_list );extern int get_option (char **str,int *pint);extern char *get_options (char *str,int nints,int *ints); -extern unsigned long memparse (char *ptr,char **retptr); +extern unsigned long long memparse (char *ptr,char **retptr);extern int session_of_pgrp (int pgrp);
include/linux/mm.h +1 -0
@@ -386,6 +386,7 @@struct page *shmem_nopage (struct vm_area_struct * vma,unsigned long address,int no_share);struct file *shmem_file_setup (char * name,loff_t size); +extern void shmem_lock (struct file * file,int lock);extern int shmem_zero_setup (struct vm_area_struct *);extern void zap_page_range (struct mm_struct *mm,unsigned long address,unsigned long size);
ipc/shm.c +3 -2
@@ -123,6 +123,7 @@ { shm_tot -= (shp->shm_segsz +PAGE_SIZE -1 ) >>PAGE_SHIFT ;shm_rmid (shp->id); +shmem_lock (shp->shm_file,0 );fput (shp->shm_file);kfree (shp); }
@@ -469,10 +470,10 @@if (err) goto out_unlock;if (cmd==SHM_LOCK ) { - shp->shm_file->f_dentry->d_inode->u.shmem_i.locked =1 ; +shmem_lock (shp->shm_file,1 ); shp->shm_flags |=SHM_LOCKED ; }else { - shp->shm_file->f_dentry->d_inode->u.shmem_i.locked =0 ; +shmem_lock (shp->shm_file,0 ); shp->shm_flags &= ~SHM_LOCKED ; }shm_unlock (shmid);
lib/cmdline.c +2 -2
@@ -93,9 +93,9 @@* megabyte, or one gigabyte, respectively. */ -unsigned long memparse (char *ptr,char **retptr) +unsigned long long memparse (char *ptr,char **retptr) { -unsigned long ret =simple_strtoul (ptr, retptr,0 ); +unsigned long long ret =simple_strtoull (ptr, retptr,0 );switch (**retptr) {case 'G' :
mm/shmem.c +95 -38
257 lines not on this page · raw message
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/
[patch2] swapfs fixes against ac9
Hi Alan,
Quoted 13 lines · Christoph Rohland
Hi Alan,
Here comes a patch for swapfs which has all my fixes against -ac9. It does the following:
- Fix
IPC_LOCK(also in 2.4.1-pre7) - Do accounting right (Also send to Linus) - memparse returns unsigned long long (Also send to Linus)
- Fix the unresolved symbols w/oCONFIG_SWAPFS- Introduce size parameter and letnr_blocksandnr_inodesuse memparse - fix some size limit/truncate bugs - fix write support on highmem machines - setsb_maxbytesin superblock for ac kernel (Alan, wouldn't it be better to do this in blocks instead of bytes?)
Quoted 3 lines
No, I did not change the name again yet. I tend to change it to "tmpfs". It's not as nice as "vmfs" but the admins will know it. But I will wait some more until changing that.
Oh, and again I forgot to compile with CONFIG_SWAPFS=n and shmem_lock slipped into the wrong area. Here is a new patch...
Greetings
Christoph
arch/i386/kernel/setup.c +1 -1
@@ -558,7 +558,7 @@* blow away any automatically generated * size */ -unsigned long start_at, mem_size; +unsigned long long start_at, mem_size;if (usermem ==0 ) {/* first time in: zap the whitelist
include/linux/kernel.h +1 -1
@@ -62,7 +62,7 @@extern int vsprintf (char *buf,const char *,va_list );extern int get_option (char **str,int *pint);extern char *get_options (char *str,int nints,int *ints); -extern unsigned long memparse (char *ptr,char **retptr); +extern unsigned long long memparse (char *ptr,char **retptr);extern int session_of_pgrp (int pgrp);
include/linux/mm.h +1 -0
@@ -386,6 +386,7 @@struct page *shmem_nopage (struct vm_area_struct * vma,unsigned long address,int no_share);struct file *shmem_file_setup (char * name,loff_t size); +extern void shmem_lock (struct file * file,int lock);extern int shmem_zero_setup (struct vm_area_struct *);extern void zap_page_range (struct mm_struct *mm,unsigned long address,unsigned long size);
ipc/shm.c +3 -2
@@ -123,6 +123,7 @@ { shm_tot -= (shp->shm_segsz +PAGE_SIZE -1 ) >>PAGE_SHIFT ;shm_rmid (shp->id); +shmem_lock (shp->shm_file,0 );fput (shp->shm_file);kfree (shp); }
@@ -469,10 +470,10 @@if (err) goto out_unlock;if (cmd==SHM_LOCK ) { - shp->shm_file->f_dentry->d_inode->u.shmem_i.locked =1 ; +shmem_lock (shp->shm_file,1 ); shp->shm_flags |=SHM_LOCKED ; }else { - shp->shm_file->f_dentry->d_inode->u.shmem_i.locked =0 ; +shmem_lock (shp->shm_file,0 ); shp->shm_flags &= ~SHM_LOCKED ; }shm_unlock (shmid);
lib/cmdline.c +2 -2
@@ -93,9 +93,9 @@* megabyte, or one gigabyte, respectively. */ -unsigned long memparse (char *ptr,char **retptr) +unsigned long long memparse (char *ptr,char **retptr) { -unsigned long ret =simple_strtoul (ptr, retptr,0 ); +unsigned long long ret =simple_strtoull (ptr, retptr,0 );switch (**retptr) {case 'G' :
mm/shmem.c +95 -38
257 lines not on this page · raw message
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/