* [RFC 00/20] Proposal for remaining BKL users @ 2011-01-25 22:17 Arnd Bergmann 2011-01-25 22:17 ` [PATCH 09/20] hpfs: rename big kernel lock to hpfs_lock Arnd Bergmann ` (3 more replies) 0 siblings, 4 replies; 14+ messages in thread From: Arnd Bergmann @ 2011-01-25 22:17 UTC (permalink / raw) To: linux-kernel Cc: Mauro Carvalho Chehab, Frederic Weisbecker, dri-devel, Mikulas Patocka, H. Peter Anvin, Ian Kent, linux-cifs, Nick Bowler, Jeff Layton, Takahiro Hirofuchi, Ross Cohen, Arnaldo Carvalho de Melo, Evgeniy Dushistov, Arnd Bergmann, Stuart Swales, Thomas Gleixner, Arjan van de Ven, autofs, linux-x25, netdev, Greg Kroah-Hartman, Palash Bandyopadhyay, linux-fsdevel, A I've gone through all the code in the kernel that uses the big kernel lock and come up with a solution that seems at least half-reasonable for each of them. The decisions are somewhat arbitrary, but here is what I'd suggest we do: * Remove in 2.6.39: i830, autofs3, smbfs * Move to staging now, kill in 2.6.41 (or later): appletalk, hpfs * Work around in an ugly way, but keep alive: * ufs, ipx, i810, cx25721 * Fix properly: * usbip, go7007, adfs, x25 Some of the patches are rather tricky and I haven't really done much proper testing, so I'd much prefer the maintainers to pick up the patches and do the necessary testing where possible, or even come up with a better solution. Arnd Bergmann (20): drm/i810: remove the BKL drm: remove i830 driver staging/usbip: convert to kthread staging/cx25721: serialize access to devlist staging/go7007: remove the BKL staging: Remove autofs3 staging: remove smbfs adfs: remove the big kernel lock hpfs: rename big kernel lock to hpfs_lock hpfs: replace BKL with a global mutex hpfs: move to drivers/staging x25: remove the BKL appletalk: move to staging staging/appletalk: remove the BKL ufs: remove the BKL ipx: remove the BKL tracing: don't trace the BKL rtmutex-tester: remove BKL tests drivers: remove extraneous includes of smp_lock.h BKL: That's all, folks MAINTAINERS | 11 +- drivers/gpu/drm/Kconfig | 47 +- drivers/gpu/drm/Makefile | 1 - drivers/gpu/drm/i810/i810_dma.c | 18 +- drivers/gpu/drm/i810/i810_drv.c | 6 +- drivers/gpu/drm/i830/Makefile | 8 - drivers/gpu/drm/i830/i830_dma.c | 1560 --------- drivers/gpu/drm/i830/i830_drv.c | 107 - drivers/gpu/drm/i830/i830_drv.h | 295 -- drivers/gpu/drm/i830/i830_irq.c | 186 -- drivers/net/Makefile | 1 - drivers/net/appletalk/Makefile | 7 - drivers/scsi/megaraid/megaraid_sas_fp.c | 1 - drivers/scsi/megaraid/megaraid_sas_fusion.c | 1 - drivers/staging/Kconfig | 8 +- drivers/staging/Makefile | 4 +- drivers/{net => staging}/appletalk/Kconfig | 1 - {net => drivers/staging}/appletalk/Makefile | 7 +- {net => drivers/staging}/appletalk/aarp.c | 2 +- .../linux => drivers/staging/appletalk}/atalk.h | 0 {net => drivers/staging}/appletalk/atalk_proc.c | 2 +- drivers/{net => staging}/appletalk/cops.c | 2 +- drivers/{net => staging}/appletalk/cops.h | 0 drivers/{net => staging}/appletalk/cops_ffdrv.h | 0 drivers/{net => staging}/appletalk/cops_ltdrv.h | 0 {net => drivers/staging}/appletalk/ddp.c | 44 +- {net => drivers/staging}/appletalk/dev.c | 0 drivers/{net => staging}/appletalk/ipddp.c | 2 +- drivers/{net => staging}/appletalk/ipddp.h | 0 drivers/{net => staging}/appletalk/ltpc.c | 2 +- drivers/{net => staging}/appletalk/ltpc.h | 0 .../staging}/appletalk/sysctl_net_atalk.c | 2 +- drivers/staging/autofs/Kconfig | 22 - drivers/staging/autofs/Makefile | 7 - drivers/staging/autofs/TODO | 8 - drivers/staging/autofs/autofs_i.h | 165 - drivers/staging/autofs/dirhash.c | 260 -- drivers/staging/autofs/init.c | 52 - drivers/staging/autofs/inode.c | 288 -- drivers/staging/autofs/root.c | 648 ---- drivers/staging/autofs/symlink.c | 26 - drivers/staging/autofs/waitq.c | 205 -- drivers/staging/cx25821/Kconfig | 1 - drivers/staging/cx25821/cx25821-alsa.c | 2 + drivers/staging/cx25821/cx25821-core.c | 16 +- drivers/staging/cx25821/cx25821-video.c | 9 +- drivers/staging/cx25821/cx25821.h | 3 +- drivers/staging/easycap/easycap.h | 1 - drivers/staging/easycap/easycap_ioctl.c | 1 - drivers/staging/go7007/Kconfig | 1 - drivers/staging/go7007/s2250-loader.c | 3 - {fs => drivers/staging}/hpfs/Kconfig | 5 +- {fs => drivers/staging}/hpfs/Makefile | 0 drivers/staging/hpfs/TODO | 5 + {fs => drivers/staging}/hpfs/alloc.c | 0 {fs => drivers/staging}/hpfs/anode.c | 0 {fs => drivers/staging}/hpfs/buffer.c | 0 {fs => drivers/staging}/hpfs/dentry.c | 0 {fs => drivers/staging}/hpfs/dir.c | 23 +- {fs => drivers/staging}/hpfs/dnode.c | 0 {fs => drivers/staging}/hpfs/ea.c | 0 {fs => drivers/staging}/hpfs/file.c | 9 +- {fs => drivers/staging}/hpfs/hpfs.h | 0 {fs => drivers/staging}/hpfs/hpfs_fn.h | 36 + {fs => drivers/staging}/hpfs/inode.c | 9 +- {fs => drivers/staging}/hpfs/map.c | 0 {fs => drivers/staging}/hpfs/name.c | 0 {fs => drivers/staging}/hpfs/namei.c | 49 +- {fs => drivers/staging}/hpfs/super.c | 21 +- drivers/staging/smbfs/Kconfig | 56 - drivers/staging/smbfs/Makefile | 18 - drivers/staging/smbfs/TODO | 8 - drivers/staging/smbfs/cache.c | 208 -- drivers/staging/smbfs/dir.c | 699 ---- drivers/staging/smbfs/file.c | 456 --- drivers/staging/smbfs/getopt.c | 64 - drivers/staging/smbfs/getopt.h | 14 - drivers/staging/smbfs/inode.c | 854 ----- drivers/staging/smbfs/ioctl.c | 68 - drivers/staging/smbfs/proc.c | 3502 -------------------- drivers/staging/smbfs/proto.h | 89 - drivers/staging/smbfs/request.c | 817 ----- drivers/staging/smbfs/request.h | 70 - drivers/staging/smbfs/smb.h | 118 - drivers/staging/smbfs/smb_debug.h | 34 - drivers/staging/smbfs/smb_fs.h | 153 - drivers/staging/smbfs/smb_fs_i.h | 37 - drivers/staging/smbfs/smb_fs_sb.h | 100 - drivers/staging/smbfs/smb_mount.h | 65 - drivers/staging/smbfs/smbfs.txt | 8 - drivers/staging/smbfs/smbiod.c | 343 -- drivers/staging/smbfs/smbno.h | 363 -- drivers/staging/smbfs/sock.c | 385 --- drivers/staging/smbfs/symlink.c | 67 - drivers/staging/usbip/Kconfig | 2 +- drivers/staging/usbip/stub.h | 4 +- drivers/staging/usbip/stub_dev.c | 13 +- drivers/staging/usbip/stub_rx.c | 13 +- drivers/staging/usbip/stub_tx.c | 14 +- drivers/staging/usbip/usbip_common.c | 105 - drivers/staging/usbip/usbip_common.h | 20 +- drivers/staging/usbip/usbip_event.c | 31 +- drivers/staging/usbip/vhci.h | 4 +- drivers/staging/usbip/vhci_hcd.c | 10 +- drivers/staging/usbip/vhci_rx.c | 16 +- drivers/staging/usbip/vhci_sysfs.c | 9 +- drivers/staging/usbip/vhci_tx.c | 14 +- drivers/target/target_core_device.c | 1 - drivers/target/target_core_fabric_lib.c | 1 - drivers/target/target_core_file.c | 1 - drivers/target/target_core_hba.c | 1 - drivers/target/target_core_iblock.c | 1 - drivers/target/target_core_pscsi.c | 1 - drivers/target/target_core_rd.c | 1 - drivers/target/target_core_tpg.c | 1 - drivers/target/target_core_transport.c | 1 - drivers/tty/n_hdlc.c | 1 - drivers/tty/n_r3964.c | 1 - drivers/tty/pty.c | 1 - drivers/tty/tty_io.c | 1 - drivers/tty/tty_ldisc.c | 2 - drivers/tty/vt/selection.c | 1 - drivers/tty/vt/vc_screen.c | 1 - drivers/tty/vt/vt.c | 1 - drivers/tty/vt/vt_ioctl.c | 1 - fs/Kconfig | 1 - fs/Makefile | 1 - fs/adfs/Kconfig | 1 - fs/adfs/dir.c | 6 - fs/adfs/inode.c | 6 - fs/adfs/super.c | 13 +- fs/compat_ioctl.c | 1 - fs/ufs/Kconfig | 1 - fs/ufs/inode.c | 78 +- fs/ufs/namei.c | 35 +- fs/ufs/super.c | 55 +- fs/ufs/truncate.c | 5 +- fs/ufs/ufs.h | 6 +- include/drm/Kbuild | 1 - include/drm/i830_drm.h | 342 -- include/linux/Kbuild | 1 - include/linux/hardirq.h | 9 +- include/linux/smp_lock.h | 65 - include/trace/events/bkl.h | 61 - init/Kconfig | 5 - kernel/rtmutex-tester.c | 39 +- kernel/sched.c | 7 - lib/Makefile | 1 - lib/kernel_lock.c | 143 - net/Kconfig | 1 - net/Makefile | 1 - net/ipx/Kconfig | 1 - net/ipx/af_ipx.c | 52 +- net/socket.c | 1 - net/x25/Kconfig | 1 - net/x25/af_x25.c | 61 +- net/x25/x25_out.c | 7 +- 157 files changed, 356 insertions(+), 13722 deletions(-) delete mode 100644 drivers/gpu/drm/i830/Makefile delete mode 100644 drivers/gpu/drm/i830/i830_dma.c delete mode 100644 drivers/gpu/drm/i830/i830_drv.c delete mode 100644 drivers/gpu/drm/i830/i830_drv.h delete mode 100644 drivers/gpu/drm/i830/i830_irq.c delete mode 100644 drivers/net/appletalk/Makefile rename drivers/{net => staging}/appletalk/Kconfig (98%) rename {net => drivers/staging}/appletalk/Makefile (56%) rename {net => drivers/staging}/appletalk/aarp.c (99%) rename {include/linux => drivers/staging/appletalk}/atalk.h (100%) rename {net => drivers/staging}/appletalk/atalk_proc.c (99%) rename drivers/{net => staging}/appletalk/cops.c (99%) rename drivers/{net => staging}/appletalk/cops.h (100%) rename drivers/{net => staging}/appletalk/cops_ffdrv.h (100%) rename drivers/{net => staging}/appletalk/cops_ltdrv.h (100%) rename {net => drivers/staging}/appletalk/ddp.c (98%) rename {net => drivers/staging}/appletalk/dev.c (100%) rename drivers/{net => staging}/appletalk/ipddp.c (99%) rename drivers/{net => staging}/appletalk/ipddp.h (100%) rename drivers/{net => staging}/appletalk/ltpc.c (99%) rename drivers/{net => staging}/appletalk/ltpc.h (100%) rename {net => drivers/staging}/appletalk/sysctl_net_atalk.c (98%) delete mode 100644 drivers/staging/autofs/Kconfig delete mode 100644 drivers/staging/autofs/Makefile delete mode 100644 drivers/staging/autofs/TODO delete mode 100644 drivers/staging/autofs/autofs_i.h delete mode 100644 drivers/staging/autofs/dirhash.c delete mode 100644 drivers/staging/autofs/init.c delete mode 100644 drivers/staging/autofs/inode.c delete mode 100644 drivers/staging/autofs/root.c delete mode 100644 drivers/staging/autofs/symlink.c delete mode 100644 drivers/staging/autofs/waitq.c rename {fs => drivers/staging}/hpfs/Kconfig (80%) rename {fs => drivers/staging}/hpfs/Makefile (100%) create mode 100644 drivers/staging/hpfs/TODO rename {fs => drivers/staging}/hpfs/alloc.c (100%) rename {fs => drivers/staging}/hpfs/anode.c (100%) rename {fs => drivers/staging}/hpfs/buffer.c (100%) rename {fs => drivers/staging}/hpfs/dentry.c (100%) rename {fs => drivers/staging}/hpfs/dir.c (97%) rename {fs => drivers/staging}/hpfs/dnode.c (100%) rename {fs => drivers/staging}/hpfs/ea.c (100%) rename {fs => drivers/staging}/hpfs/file.c (97%) rename {fs => drivers/staging}/hpfs/hpfs.h (100%) rename {fs => drivers/staging}/hpfs/hpfs_fn.h (91%) rename {fs => drivers/staging}/hpfs/inode.c (98%) rename {fs => drivers/staging}/hpfs/map.c (100%) rename {fs => drivers/staging}/hpfs/name.c (100%) rename {fs => drivers/staging}/hpfs/namei.c (96%) rename {fs => drivers/staging}/hpfs/super.c (98%) delete mode 100644 drivers/staging/smbfs/Kconfig delete mode 100644 drivers/staging/smbfs/Makefile delete mode 100644 drivers/staging/smbfs/TODO delete mode 100644 drivers/staging/smbfs/cache.c delete mode 100644 drivers/staging/smbfs/dir.c delete mode 100644 drivers/staging/smbfs/file.c delete mode 100644 drivers/staging/smbfs/getopt.c delete mode 100644 drivers/staging/smbfs/getopt.h delete mode 100644 drivers/staging/smbfs/inode.c delete mode 100644 drivers/staging/smbfs/ioctl.c delete mode 100644 drivers/staging/smbfs/proc.c delete mode 100644 drivers/staging/smbfs/proto.h delete mode 100644 drivers/staging/smbfs/request.c delete mode 100644 drivers/staging/smbfs/request.h delete mode 100644 drivers/staging/smbfs/smb.h delete mode 100644 drivers/staging/smbfs/smb_debug.h delete mode 100644 drivers/staging/smbfs/smb_fs.h delete mode 100644 drivers/staging/smbfs/smb_fs_i.h delete mode 100644 drivers/staging/smbfs/smb_fs_sb.h delete mode 100644 drivers/staging/smbfs/smb_mount.h delete mode 100644 drivers/staging/smbfs/smbfs.txt delete mode 100644 drivers/staging/smbfs/smbiod.c delete mode 100644 drivers/staging/smbfs/smbno.h delete mode 100644 drivers/staging/smbfs/sock.c delete mode 100644 drivers/staging/smbfs/symlink.c delete mode 100644 include/drm/i830_drm.h delete mode 100644 include/linux/smp_lock.h delete mode 100644 include/trace/events/bkl.h delete mode 100644 lib/kernel_lock.c Cc: Andrew Hendry <andrew.hendry@gmail.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Arjan van de Ven <arjan@linux.intel.com> Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net> Cc: autofs@linux.kernel.org Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Dave Airlie <airlied@linux.ie> Cc: David Airlie <airlied@linux.ie> Cc: dri-devel@lists.freedesktop.org Cc: Evgeniy Dushistov <dushistov@mail.ru> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Greg Kroah-Hartman <gregkh@suse.de> Cc: "H. Peter Anvin" <hpa@zytor.com> Cc: Ian Kent <raven@themaw.net> Cc: Ingo Molnar <mingo@elte.hu> Cc: Jeff Layton <jlayton@redhat.com> Cc: linux-cifs@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org Cc: linux-x25@vger.kernel.org Cc: Mauro Carvalho Chehab <mchehab@redhat.com> Cc: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz> Cc: netdev@vger.kernel.org Cc: Nick Bowler <nbowler@elliptictech.com> Cc: Palash Bandyopadhyay <palash.bandyopadhyay@conexant.com> Cc: Ross Cohen <rcohen@snurgle.org> Cc: Russell King <rmk@arm.linux.org.uk> Cc: Stuart Swales <stuart.swales.croftnuisk@gmail.com> Cc: Takahiro Hirofuchi <hirofuchi@users.sourceforge.net> Cc: Thomas Gleixner <tglx@linutronix.de> ^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 09/20] hpfs: rename big kernel lock to hpfs_lock 2011-01-25 22:17 [RFC 00/20] Proposal for remaining BKL users Arnd Bergmann @ 2011-01-25 22:17 ` Arnd Bergmann 2011-01-25 22:17 ` [PATCH 10/20] hpfs: replace BKL with a global mutex Arnd Bergmann ` (2 subsequent siblings) 3 siblings, 0 replies; 14+ messages in thread From: Arnd Bergmann @ 2011-01-25 22:17 UTC (permalink / raw) To: linux-kernel; +Cc: Arnd Bergmann, Mikulas Patocka, linux-fsdevel This is a preparation to make it easier to get rid of the BKL, by just having to change one place in the HPFS code. There is no global state in hpfs, so all locking can be done per superblock, and the fill_super/put_super functions can do without it entirely. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz> Cc: linux-fsdevel@vger.kernel.org --- fs/hpfs/dir.c | 23 +++++++++++------------ fs/hpfs/file.c | 9 ++++----- fs/hpfs/hpfs_fn.h | 14 ++++++++++++++ fs/hpfs/inode.c | 9 ++++----- fs/hpfs/namei.c | 49 ++++++++++++++++++++++++------------------------- fs/hpfs/super.c | 20 +++++--------------- 6 files changed, 62 insertions(+), 62 deletions(-) diff --git a/fs/hpfs/dir.c b/fs/hpfs/dir.c index d32f63a..b3d7c0d 100644 --- a/fs/hpfs/dir.c +++ b/fs/hpfs/dir.c @@ -6,16 +6,15 @@ * directory VFS functions */ -#include <linux/smp_lock.h> #include <linux/slab.h> #include "hpfs_fn.h" static int hpfs_dir_release(struct inode *inode, struct file *filp) { - lock_kernel(); + hpfs_lock(inode->i_sb); hpfs_del_pos(inode, &filp->f_pos); /*hpfs_write_if_changed(inode);*/ - unlock_kernel(); + hpfs_unlock(inode->i_sb); return 0; } @@ -30,7 +29,7 @@ static loff_t hpfs_dir_lseek(struct file *filp, loff_t off, int whence) struct hpfs_inode_info *hpfs_inode = hpfs_i(i); struct super_block *s = i->i_sb; - lock_kernel(); + hpfs_lock(s); /*printk("dir lseek\n");*/ if (new_off == 0 || new_off == 1 || new_off == 11 || new_off == 12 || new_off == 13) goto ok; @@ -43,12 +42,12 @@ static loff_t hpfs_dir_lseek(struct file *filp, loff_t off, int whence) } mutex_unlock(&i->i_mutex); ok: - unlock_kernel(); + hpfs_unlock(s); return filp->f_pos = new_off; fail: mutex_unlock(&i->i_mutex); /*printk("illegal lseek: %016llx\n", new_off);*/ - unlock_kernel(); + hpfs_unlock(s); return -ESPIPE; } @@ -64,7 +63,7 @@ static int hpfs_readdir(struct file *filp, void *dirent, filldir_t filldir) int c1, c2 = 0; int ret = 0; - lock_kernel(); + hpfs_lock(inode->i_sb); if (hpfs_sb(inode->i_sb)->sb_chk) { if (hpfs_chk_sectors(inode->i_sb, inode->i_ino, 1, "dir_fnode")) { @@ -167,7 +166,7 @@ static int hpfs_readdir(struct file *filp, void *dirent, filldir_t filldir) hpfs_brelse4(&qbh); } out: - unlock_kernel(); + hpfs_unlock(inode->i_sb); return ret; } @@ -197,10 +196,10 @@ struct dentry *hpfs_lookup(struct inode *dir, struct dentry *dentry, struct name struct inode *result = NULL; struct hpfs_inode_info *hpfs_result; - lock_kernel(); + hpfs_lock(dir->i_sb); if ((err = hpfs_chk_name(name, &len))) { if (err == -ENAMETOOLONG) { - unlock_kernel(); + hpfs_unlock(dir->i_sb); return ERR_PTR(-ENAMETOOLONG); } goto end_add; @@ -298,7 +297,7 @@ struct dentry *hpfs_lookup(struct inode *dir, struct dentry *dentry, struct name end: end_add: - unlock_kernel(); + hpfs_unlock(dir->i_sb); d_add(dentry, result); return NULL; @@ -311,7 +310,7 @@ struct dentry *hpfs_lookup(struct inode *dir, struct dentry *dentry, struct name /*bail:*/ - unlock_kernel(); + hpfs_unlock(dir->i_sb); return ERR_PTR(-ENOENT); } diff --git a/fs/hpfs/file.c b/fs/hpfs/file.c index c034088..2dbae20 100644 --- a/fs/hpfs/file.c +++ b/fs/hpfs/file.c @@ -6,16 +6,15 @@ * file VFS functions */ -#include <linux/smp_lock.h> #include "hpfs_fn.h" #define BLOCKS(size) (((size) + 511) >> 9) static int hpfs_file_release(struct inode *inode, struct file *file) { - lock_kernel(); + hpfs_lock(inode->i_sb); hpfs_write_if_changed(inode); - unlock_kernel(); + hpfs_unlock(inode->i_sb); return 0; } @@ -49,14 +48,14 @@ static secno hpfs_bmap(struct inode *inode, unsigned file_secno) static void hpfs_truncate(struct inode *i) { if (IS_IMMUTABLE(i)) return /*-EPERM*/; - lock_kernel(); + hpfs_lock(i->i_sb); hpfs_i(i)->i_n_secs = 0; i->i_blocks = 1 + ((i->i_size + 511) >> 9); hpfs_i(i)->mmu_private = i->i_size; hpfs_truncate_btree(i->i_sb, i->i_ino, 1, ((i->i_size + 511) >> 9)); hpfs_write_inode(i); hpfs_i(i)->i_n_secs = 0; - unlock_kernel(); + hpfs_unlock(i->i_sb); } static int hpfs_get_block(struct inode *inode, sector_t iblock, struct buffer_head *bh_result, int create) diff --git a/fs/hpfs/hpfs_fn.h b/fs/hpfs/hpfs_fn.h index 1c43dbe..6761cb3 100644 --- a/fs/hpfs/hpfs_fn.h +++ b/fs/hpfs/hpfs_fn.h @@ -13,6 +13,7 @@ #include <linux/pagemap.h> #include <linux/buffer_head.h> #include <linux/slab.h> +#include <linux/smp_lock.h> #include "hpfs.h" @@ -342,3 +343,16 @@ static inline time32_t gmt_to_local(struct super_block *s, time_t t) extern struct timezone sys_tz; return t - sys_tz.tz_minuteswest * 60 - hpfs_sb(s)->sb_timeshift; } + +/* + * Locking + */ +static inline void hpfs_lock(struct super_block *s) +{ + lock_kernel(); +} + +static inline void hpfs_unlock(struct super_block *s) +{ + unlock_kernel(); +} diff --git a/fs/hpfs/inode.c b/fs/hpfs/inode.c index 1ae35ba..87f1f78 100644 --- a/fs/hpfs/inode.c +++ b/fs/hpfs/inode.c @@ -6,7 +6,6 @@ * inode VFS functions */ -#include <linux/smp_lock.h> #include <linux/slab.h> #include "hpfs_fn.h" @@ -267,7 +266,7 @@ int hpfs_setattr(struct dentry *dentry, struct iattr *attr) struct inode *inode = dentry->d_inode; int error = -EINVAL; - lock_kernel(); + hpfs_lock(inode->i_sb); if (inode->i_ino == hpfs_sb(inode->i_sb)->sb_root) goto out_unlock; if ((attr->ia_valid & ATTR_SIZE) && attr->ia_size > inode->i_size) @@ -290,7 +289,7 @@ int hpfs_setattr(struct dentry *dentry, struct iattr *attr) hpfs_write_inode(inode); out_unlock: - unlock_kernel(); + hpfs_unlock(inode->i_sb); return error; } @@ -307,8 +306,8 @@ void hpfs_evict_inode(struct inode *inode) truncate_inode_pages(&inode->i_data, 0); end_writeback(inode); if (!inode->i_nlink) { - lock_kernel(); + hpfs_lock(inode->i_sb); hpfs_remove_fnode(inode->i_sb, inode->i_ino); - unlock_kernel(); + hpfs_unlock(inode->i_sb); } } diff --git a/fs/hpfs/namei.c b/fs/hpfs/namei.c index f4ad9e3..d5f8c8a 100644 --- a/fs/hpfs/namei.c +++ b/fs/hpfs/namei.c @@ -6,7 +6,6 @@ * adding & removing files & directories */ #include <linux/sched.h> -#include <linux/smp_lock.h> #include "hpfs_fn.h" static int hpfs_mkdir(struct inode *dir, struct dentry *dentry, int mode) @@ -25,7 +24,7 @@ static int hpfs_mkdir(struct inode *dir, struct dentry *dentry, int mode) struct hpfs_dirent dee; int err; if ((err = hpfs_chk_name(name, &len))) return err==-ENOENT ? -EINVAL : err; - lock_kernel(); + hpfs_lock(dir->i_sb); err = -ENOSPC; fnode = hpfs_alloc_fnode(dir->i_sb, hpfs_i(dir)->i_dno, &fno, &bh); if (!fnode) @@ -103,7 +102,7 @@ static int hpfs_mkdir(struct inode *dir, struct dentry *dentry, int mode) } d_instantiate(dentry, result); mutex_unlock(&hpfs_i(dir)->i_mutex); - unlock_kernel(); + hpfs_unlock(dir->i_sb); return 0; bail3: mutex_unlock(&hpfs_i(dir)->i_mutex); @@ -115,7 +114,7 @@ bail1: brelse(bh); hpfs_free_sectors(dir->i_sb, fno, 1); bail: - unlock_kernel(); + hpfs_unlock(dir->i_sb); return err; } @@ -132,7 +131,7 @@ static int hpfs_create(struct inode *dir, struct dentry *dentry, int mode, struc int err; if ((err = hpfs_chk_name(name, &len))) return err==-ENOENT ? -EINVAL : err; - lock_kernel(); + hpfs_lock(dir->i_sb); err = -ENOSPC; fnode = hpfs_alloc_fnode(dir->i_sb, hpfs_i(dir)->i_dno, &fno, &bh); if (!fnode) @@ -195,7 +194,7 @@ static int hpfs_create(struct inode *dir, struct dentry *dentry, int mode, struc } d_instantiate(dentry, result); mutex_unlock(&hpfs_i(dir)->i_mutex); - unlock_kernel(); + hpfs_unlock(dir->i_sb); return 0; bail2: @@ -205,7 +204,7 @@ bail1: brelse(bh); hpfs_free_sectors(dir->i_sb, fno, 1); bail: - unlock_kernel(); + hpfs_unlock(dir->i_sb); return err; } @@ -224,7 +223,7 @@ static int hpfs_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t if (hpfs_sb(dir->i_sb)->sb_eas < 2) return -EPERM; if (!new_valid_dev(rdev)) return -EINVAL; - lock_kernel(); + hpfs_lock(dir->i_sb); err = -ENOSPC; fnode = hpfs_alloc_fnode(dir->i_sb, hpfs_i(dir)->i_dno, &fno, &bh); if (!fnode) @@ -274,7 +273,7 @@ static int hpfs_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t d_instantiate(dentry, result); mutex_unlock(&hpfs_i(dir)->i_mutex); brelse(bh); - unlock_kernel(); + hpfs_unlock(dir->i_sb); return 0; bail2: mutex_unlock(&hpfs_i(dir)->i_mutex); @@ -283,7 +282,7 @@ bail1: brelse(bh); hpfs_free_sectors(dir->i_sb, fno, 1); bail: - unlock_kernel(); + hpfs_unlock(dir->i_sb); return err; } @@ -299,9 +298,9 @@ static int hpfs_symlink(struct inode *dir, struct dentry *dentry, const char *sy struct inode *result; int err; if ((err = hpfs_chk_name(name, &len))) return err==-ENOENT ? -EINVAL : err; - lock_kernel(); + hpfs_lock(dir->i_sb); if (hpfs_sb(dir->i_sb)->sb_eas < 2) { - unlock_kernel(); + hpfs_unlock(dir->i_sb); return -EPERM; } err = -ENOSPC; @@ -354,7 +353,7 @@ static int hpfs_symlink(struct inode *dir, struct dentry *dentry, const char *sy hpfs_write_inode_nolock(result); d_instantiate(dentry, result); mutex_unlock(&hpfs_i(dir)->i_mutex); - unlock_kernel(); + hpfs_unlock(dir->i_sb); return 0; bail2: mutex_unlock(&hpfs_i(dir)->i_mutex); @@ -363,7 +362,7 @@ bail1: brelse(bh); hpfs_free_sectors(dir->i_sb, fno, 1); bail: - unlock_kernel(); + hpfs_unlock(dir->i_sb); return err; } @@ -380,7 +379,7 @@ static int hpfs_unlink(struct inode *dir, struct dentry *dentry) int rep = 0; int err; - lock_kernel(); + hpfs_lock(dir->i_sb); hpfs_adjust_length(name, &len); again: mutex_lock(&hpfs_i(inode)->i_parent_mutex); @@ -416,7 +415,7 @@ again: dentry_unhash(dentry); if (!d_unhashed(dentry)) { dput(dentry); - unlock_kernel(); + hpfs_unlock(dir->i_sb); return -ENOSPC; } if (generic_permission(inode, MAY_WRITE, 0, NULL) || @@ -435,7 +434,7 @@ again: if (!err) goto again; } - unlock_kernel(); + hpfs_unlock(dir->i_sb); return -ENOSPC; default: drop_nlink(inode); @@ -448,7 +447,7 @@ out1: out: mutex_unlock(&hpfs_i(dir)->i_mutex); mutex_unlock(&hpfs_i(inode)->i_parent_mutex); - unlock_kernel(); + hpfs_unlock(dir->i_sb); return err; } @@ -466,7 +465,7 @@ static int hpfs_rmdir(struct inode *dir, struct dentry *dentry) int r; hpfs_adjust_length(name, &len); - lock_kernel(); + hpfs_lock(dir->i_sb); mutex_lock(&hpfs_i(inode)->i_parent_mutex); mutex_lock(&hpfs_i(dir)->i_mutex); err = -ENOENT; @@ -508,7 +507,7 @@ out1: out: mutex_unlock(&hpfs_i(dir)->i_mutex); mutex_unlock(&hpfs_i(inode)->i_parent_mutex); - unlock_kernel(); + hpfs_unlock(dir->i_sb); return err; } @@ -521,21 +520,21 @@ static int hpfs_symlink_readpage(struct file *file, struct page *page) int err; err = -EIO; - lock_kernel(); + hpfs_lock(i->i_sb); if (!(fnode = hpfs_map_fnode(i->i_sb, i->i_ino, &bh))) goto fail; err = hpfs_read_ea(i->i_sb, fnode, "SYMLINK", link, PAGE_SIZE); brelse(bh); if (err) goto fail; - unlock_kernel(); + hpfs_unlock(i->i_sb); SetPageUptodate(page); kunmap(page); unlock_page(page); return 0; fail: - unlock_kernel(); + hpfs_unlock(i->i_sb); SetPageError(page); kunmap(page); unlock_page(page); @@ -567,7 +566,7 @@ static int hpfs_rename(struct inode *old_dir, struct dentry *old_dentry, err = 0; hpfs_adjust_length(old_name, &old_len); - lock_kernel(); + hpfs_lock(i->i_sb); /* order doesn't matter, due to VFS exclusion */ mutex_lock(&hpfs_i(i)->i_parent_mutex); if (new_inode) @@ -659,7 +658,7 @@ end1: mutex_unlock(&hpfs_i(i)->i_parent_mutex); if (new_inode) mutex_unlock(&hpfs_i(new_inode)->i_parent_mutex); - unlock_kernel(); + hpfs_unlock(i->i_sb); return err; } diff --git a/fs/hpfs/super.c b/fs/hpfs/super.c index b30426b..501ea86 100644 --- a/fs/hpfs/super.c +++ b/fs/hpfs/super.c @@ -13,7 +13,6 @@ #include <linux/statfs.h> #include <linux/magic.h> #include <linux/sched.h> -#include <linux/smp_lock.h> #include <linux/bitmap.h> #include <linux/slab.h> @@ -103,15 +102,11 @@ static void hpfs_put_super(struct super_block *s) { struct hpfs_sb_info *sbi = hpfs_sb(s); - lock_kernel(); - kfree(sbi->sb_cp_table); kfree(sbi->sb_bmp_dir); unmark_dirty(s); s->s_fs_info = NULL; kfree(sbi); - - unlock_kernel(); } unsigned hpfs_count_one_bitmap(struct super_block *s, secno secno) @@ -143,7 +138,7 @@ static int hpfs_statfs(struct dentry *dentry, struct kstatfs *buf) struct super_block *s = dentry->d_sb; struct hpfs_sb_info *sbi = hpfs_sb(s); u64 id = huge_encode_dev(s->s_bdev->bd_dev); - lock_kernel(); + hpfs_lock(s); /*if (sbi->sb_n_free == -1) {*/ sbi->sb_n_free = count_bitmaps(s); @@ -160,7 +155,7 @@ static int hpfs_statfs(struct dentry *dentry, struct kstatfs *buf) buf->f_fsid.val[1] = (u32)(id >> 32); buf->f_namelen = 254; - unlock_kernel(); + hpfs_unlock(s); return 0; } @@ -406,7 +401,7 @@ static int hpfs_remount_fs(struct super_block *s, int *flags, char *data) *flags |= MS_NOATIME; - lock_kernel(); + hpfs_lock(s); lock_super(s); uid = sbi->sb_uid; gid = sbi->sb_gid; umask = 0777 & ~sbi->sb_mode; @@ -441,12 +436,12 @@ static int hpfs_remount_fs(struct super_block *s, int *flags, char *data) replace_mount_options(s, new_opts); unlock_super(s); - unlock_kernel(); + hpfs_unlock(s); return 0; out_err: unlock_super(s); - unlock_kernel(); + hpfs_unlock(s); kfree(new_opts); return -EINVAL; } @@ -484,13 +479,10 @@ static int hpfs_fill_super(struct super_block *s, void *options, int silent) int o; - lock_kernel(); - save_mount_options(s, options); sbi = kzalloc(sizeof(*sbi), GFP_KERNEL); if (!sbi) { - unlock_kernel(); return -ENOMEM; } s->s_fs_info = sbi; @@ -677,7 +669,6 @@ static int hpfs_fill_super(struct super_block *s, void *options, int silent) root->i_blocks = 5; hpfs_brelse4(&qbh); } - unlock_kernel(); return 0; bail4: brelse(bh2); @@ -689,7 +680,6 @@ bail0: kfree(sbi->sb_cp_table); s->s_fs_info = NULL; kfree(sbi); - unlock_kernel(); return -EINVAL; } -- 1.7.1 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 10/20] hpfs: replace BKL with a global mutex 2011-01-25 22:17 [RFC 00/20] Proposal for remaining BKL users Arnd Bergmann 2011-01-25 22:17 ` [PATCH 09/20] hpfs: rename big kernel lock to hpfs_lock Arnd Bergmann @ 2011-01-25 22:17 ` Arnd Bergmann 2011-01-26 0:15 ` Andi Kleen [not found] ` <m2ipxc34aq.fsf@linux.intel.com> 2011-01-25 22:17 ` [PATCH 11/20] hpfs: move to drivers/staging Arnd Bergmann 2011-01-26 2:22 ` [RFC 00/20] Proposal for remaining BKL users Greg KH 3 siblings, 2 replies; 14+ messages in thread From: Arnd Bergmann @ 2011-01-25 22:17 UTC (permalink / raw) To: linux-kernel; +Cc: Arnd Bergmann, Mikulas Patocka, linux-fsdevel This removes the BKL in hpfs in a rather awful way, by replacing it with a mutex that basically serializes the entire file system. The only reason I hope to get away with this is because there don't seem to be any real users left, and the file system is going out through the staging door anyways. Since the mutex code is not even tested and I don't expect anyone to do that, I'm marking it as broken on SMP and PREEMPT kernels, so it won't actually get used. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz> Cc: linux-fsdevel@vger.kernel.org --- fs/hpfs/Kconfig | 2 +- fs/hpfs/hpfs_fn.h | 30 ++++++++++++++++++++++++++---- fs/hpfs/super.c | 1 + 3 files changed, 28 insertions(+), 5 deletions(-) diff --git a/fs/hpfs/Kconfig b/fs/hpfs/Kconfig index 63b6f56..73476c1 100644 --- a/fs/hpfs/Kconfig +++ b/fs/hpfs/Kconfig @@ -1,7 +1,7 @@ config HPFS_FS tristate "OS/2 HPFS file system support" depends on BLOCK - depends on BKL # nontrivial to fix + depends on BROKEN || !(SMP || PREEMPT) help OS/2 is IBM's operating system for PC's, the same as Warp, and HPFS is the file system used for organizing files on OS/2 hard disk diff --git a/fs/hpfs/hpfs_fn.h b/fs/hpfs/hpfs_fn.h index 6761cb3..ffdb16e 100644 --- a/fs/hpfs/hpfs_fn.h +++ b/fs/hpfs/hpfs_fn.h @@ -13,7 +13,6 @@ #include <linux/pagemap.h> #include <linux/buffer_head.h> #include <linux/slab.h> -#include <linux/smp_lock.h> #include "hpfs.h" @@ -90,6 +89,7 @@ struct hpfs_sb_info { unsigned sb_max_fwd_alloc; /* max forwad allocation */ struct mutex hpfs_creation_de; /* when creating dirents, nobody else can alloc blocks */ + struct mutex global_mutex; /* replaces BKL, serializes everything on SMP */ /*unsigned sb_mounting : 1;*/ int sb_timeshift; }; @@ -345,14 +345,36 @@ static inline time32_t gmt_to_local(struct super_block *s, time_t t) } /* - * Locking + * Locking: + * + * hpfs_lock() is a leftover from the big kernel lock. + * This mutex is used as the outermost lock in hpfs, + * all other mutexes (inode->i_mutex, hpfs_inode_info->i_mutex, + * hpfs_inode_info->i_parent_mutex, hpfs_creation_de and + * lock_super) can get taken while hpfs_lock is held already. + * + * Code inspection has shown that hpfs_lock never gets taken + * recursively, and that it never nests inside one of the + * mutexes above, so there should be no deadlocks. + * + * However, it is frequently held while wait_for_buffer + * sleeps, which probably causes a huge slowdown, since + * that serializes all operations on a file system. + * + * Moreover, the locking code is entirely untested, use at + * your own risk. */ static inline void hpfs_lock(struct super_block *s) { - lock_kernel(); +#if defined(CONFIG_SMP) || defined(CONFIG_PREEMPT) +#warning HPFS is likely broken on SMP configurations + mutex_lock(&hpfs_sb(s)->global_mutex); +#endif } static inline void hpfs_unlock(struct super_block *s) { - unlock_kernel(); +#if defined(CONFIG_SMP) || defined(CONFIG_PREEMPT) + mutex_unlock(&hpfs_sb(s)->global_mutex); +#endif } diff --git a/fs/hpfs/super.c b/fs/hpfs/super.c index 501ea86..694a683 100644 --- a/fs/hpfs/super.c +++ b/fs/hpfs/super.c @@ -491,6 +491,7 @@ static int hpfs_fill_super(struct super_block *s, void *options, int silent) sbi->sb_cp_table = NULL; mutex_init(&sbi->hpfs_creation_de); + mutex_init(&sbi->global_mutex); uid = current_uid(); gid = current_gid(); -- 1.7.1 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH 10/20] hpfs: replace BKL with a global mutex 2011-01-25 22:17 ` [PATCH 10/20] hpfs: replace BKL with a global mutex Arnd Bergmann @ 2011-01-26 0:15 ` Andi Kleen [not found] ` <m2ipxc34aq.fsf@linux.intel.com> 1 sibling, 0 replies; 14+ messages in thread From: Andi Kleen @ 2011-01-26 0:15 UTC (permalink / raw) To: linux-kernel; +Cc: linux-fsdevel Arnd Bergmann <arnd@arndb.de> writes: > This removes the BKL in hpfs in a rather awful > way, by replacing it with a mutex that basically > serializes the entire file system. I don't think that's a very good idea, there's danger of holding it over IO and that would be really bad (as in like MINIX[1]) It would be better to do it the i810 way and check for the number of CPUs at module init time and refuse to run if it's > 1 -Andi [1] showing my age -- Andi Kleen Intel Open Source Technology Center ^ permalink raw reply [flat|nested] 14+ messages in thread
[parent not found: <m2ipxc34aq.fsf@linux.intel.com>]
* [PATCH v2] hpfs: remove the BKL [not found] ` <m2ipxc34aq.fsf@linux.intel.com> @ 2011-01-26 12:48 ` Arnd Bergmann 0 siblings, 0 replies; 14+ messages in thread From: Arnd Bergmann @ 2011-01-26 12:48 UTC (permalink / raw) To: Andi Kleen; +Cc: linux-kernel, Mikulas Patocka, linux-fsdevel This removes the BKL in hpfs in a rather awful way, by making the code only work on uniprocessor systems without kernel preemption, as suggested by Andi Kleen. The HPFS code probably has close to zero remaining users on current kernels, all archeological uses of the file system can probably be done with the significant restrictions. The hpfs_lock/hpfs_unlock functions are left in the code as stubs, in case someone feels motivated to make it work on SMP again. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz> Cc: linux-fsdevel@vger.kernel.org Cc: Andi Kleen <ak@linux.intel.com> diff --git a/fs/hpfs/Kconfig b/fs/hpfs/Kconfig index 63b6f56..0c39dc3 100644 --- a/fs/hpfs/Kconfig +++ b/fs/hpfs/Kconfig @@ -1,7 +1,7 @@ config HPFS_FS tristate "OS/2 HPFS file system support" depends on BLOCK - depends on BKL # nontrivial to fix + depends on BROKEN || !PREEMPT help OS/2 is IBM's operating system for PC's, the same as Warp, and HPFS is the file system used for organizing files on OS/2 hard disk diff --git a/fs/hpfs/hpfs_fn.h b/fs/hpfs/hpfs_fn.h index 6761cb3..c15adbc 100644 --- a/fs/hpfs/hpfs_fn.h +++ b/fs/hpfs/hpfs_fn.h @@ -13,7 +13,6 @@ #include <linux/pagemap.h> #include <linux/buffer_head.h> #include <linux/slab.h> -#include <linux/smp_lock.h> #include "hpfs.h" @@ -345,14 +344,23 @@ static inline time32_t gmt_to_local(struct super_block *s, time_t t) } /* - * Locking + * Locking: + * + * hpfs_lock() is a leftover from the big kernel lock. + * Right now, these functions are empty and only left + * for documentation purposes. The file system no longer + * works on SMP systems, so the lock is not needed + * any more. + * + * If someone is interested in making it work again, this + * would be the place to start by adding a per-superblock + * mutex and fixing all the bugs and performance issues + * caused by that. */ static inline void hpfs_lock(struct super_block *s) { - lock_kernel(); } static inline void hpfs_unlock(struct super_block *s) { - unlock_kernel(); } diff --git a/fs/hpfs/super.c b/fs/hpfs/super.c index 501ea86..c89b408 100644 --- a/fs/hpfs/super.c +++ b/fs/hpfs/super.c @@ -479,6 +479,11 @@ static int hpfs_fill_super(struct super_block *s, void *options, int silent) int o; + if (num_possible_cpus() > 1) { + printk(KERN_ERR "HPFS is not SMP safe\n"); + return -EINVAL; + } + save_mount_options(s, options); sbi = kzalloc(sizeof(*sbi), GFP_KERNEL); ^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 11/20] hpfs: move to drivers/staging 2011-01-25 22:17 [RFC 00/20] Proposal for remaining BKL users Arnd Bergmann 2011-01-25 22:17 ` [PATCH 09/20] hpfs: rename big kernel lock to hpfs_lock Arnd Bergmann 2011-01-25 22:17 ` [PATCH 10/20] hpfs: replace BKL with a global mutex Arnd Bergmann @ 2011-01-25 22:17 ` Arnd Bergmann 2011-02-07 16:17 ` Mikulas Patocka 2011-01-26 2:22 ` [RFC 00/20] Proposal for remaining BKL users Greg KH 3 siblings, 1 reply; 14+ messages in thread From: Arnd Bergmann @ 2011-01-25 22:17 UTC (permalink / raw) To: linux-kernel; +Cc: Arnd Bergmann, Mikulas Patocka, linux-fsdevel hpfs has not seen a single patch from its maintainer since the start of the git history, and the user base seems to be completely gone after the end of OS/2. I have tried to keep the file system alive as much as possible through the BKL removal, but this its time seems to have come. If we can find an actual user who is willing to test patches, or even a maintainer that can work on the code, it can easily be moved back into the main tree. If that does not happen, it will get removed from the kernel tree after a few releases in staging/. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz> Cc: linux-fsdevel@vger.kernel.org --- MAINTAINERS | 2 +- drivers/staging/Kconfig | 2 ++ drivers/staging/Makefile | 1 + {fs => drivers/staging}/hpfs/Kconfig | 3 +++ {fs => drivers/staging}/hpfs/Makefile | 0 drivers/staging/hpfs/TODO | 5 +++++ {fs => drivers/staging}/hpfs/alloc.c | 0 {fs => drivers/staging}/hpfs/anode.c | 0 {fs => drivers/staging}/hpfs/buffer.c | 0 {fs => drivers/staging}/hpfs/dentry.c | 0 {fs => drivers/staging}/hpfs/dir.c | 0 {fs => drivers/staging}/hpfs/dnode.c | 0 {fs => drivers/staging}/hpfs/ea.c | 0 {fs => drivers/staging}/hpfs/file.c | 0 {fs => drivers/staging}/hpfs/hpfs.h | 0 {fs => drivers/staging}/hpfs/hpfs_fn.h | 0 {fs => drivers/staging}/hpfs/inode.c | 0 {fs => drivers/staging}/hpfs/map.c | 0 {fs => drivers/staging}/hpfs/name.c | 0 {fs => drivers/staging}/hpfs/namei.c | 0 {fs => drivers/staging}/hpfs/super.c | 0 fs/Kconfig | 1 - fs/Makefile | 1 - 23 files changed, 12 insertions(+), 3 deletions(-) rename {fs => drivers/staging}/hpfs/Kconfig (85%) rename {fs => drivers/staging}/hpfs/Makefile (100%) create mode 100644 drivers/staging/hpfs/TODO rename {fs => drivers/staging}/hpfs/alloc.c (100%) rename {fs => drivers/staging}/hpfs/anode.c (100%) rename {fs => drivers/staging}/hpfs/buffer.c (100%) rename {fs => drivers/staging}/hpfs/dentry.c (100%) rename {fs => drivers/staging}/hpfs/dir.c (100%) rename {fs => drivers/staging}/hpfs/dnode.c (100%) rename {fs => drivers/staging}/hpfs/ea.c (100%) rename {fs => drivers/staging}/hpfs/file.c (100%) rename {fs => drivers/staging}/hpfs/hpfs.h (100%) rename {fs => drivers/staging}/hpfs/hpfs_fn.h (100%) rename {fs => drivers/staging}/hpfs/inode.c (100%) rename {fs => drivers/staging}/hpfs/map.c (100%) rename {fs => drivers/staging}/hpfs/name.c (100%) rename {fs => drivers/staging}/hpfs/namei.c (100%) rename {fs => drivers/staging}/hpfs/super.c (100%) diff --git a/MAINTAINERS b/MAINTAINERS index 246ee22..fe5ca5f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3009,7 +3009,7 @@ HPFS FILESYSTEM M: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz> W: http://artax.karlin.mff.cuni.cz/~mikulas/vyplody/hpfs/index-e.cgi S: Maintained -F: fs/hpfs/ +F: drivers/staging/hpfs/ HSO 3G MODEM DRIVER M: Jan Dumon <j.dumon@option.com> diff --git a/drivers/staging/Kconfig b/drivers/staging/Kconfig index 6ac0418..9fc5aa6 100644 --- a/drivers/staging/Kconfig +++ b/drivers/staging/Kconfig @@ -175,5 +175,7 @@ source "drivers/staging/cptm1217/Kconfig" source "drivers/staging/ste_rmi4/Kconfig" +source "drivers/staging/hpfs/Kconfig" + endif # !STAGING_EXCLUDE_BUILD endif # STAGING diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile index a834d2e..878f381 100644 --- a/drivers/staging/Makefile +++ b/drivers/staging/Makefile @@ -68,3 +68,4 @@ obj-$(CONFIG_SND_INTEL_SST) += intel_sst/ obj-$(CONFIG_SPEAKUP) += speakup/ obj-$(CONFIG_TOUCHSCREEN_CLEARPAD_TM1217) += cptm1217/ obj-$(CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4) += ste_rmi4/ +obj-$(CONFIG_HPFS_FS) += hpfs/ diff --git a/fs/hpfs/Kconfig b/drivers/staging/hpfs/Kconfig similarity index 85% rename from fs/hpfs/Kconfig rename to drivers/staging/hpfs/Kconfig index 73476c1..f979319 100644 --- a/fs/hpfs/Kconfig +++ b/drivers/staging/hpfs/Kconfig @@ -11,5 +11,8 @@ config HPFS_FS option in order to be able to read them. Read <file:Documentation/filesystems/hpfs.txt>. + The HPFS code is about to get removed from the kernel and is no + longer supported on SMP or PREEMPT kernels. + To compile this file system support as a module, choose M here: the module will be called hpfs. If unsure, say N. diff --git a/fs/hpfs/Makefile b/drivers/staging/hpfs/Makefile similarity index 100% rename from fs/hpfs/Makefile rename to drivers/staging/hpfs/Makefile diff --git a/drivers/staging/hpfs/TODO b/drivers/staging/hpfs/TODO new file mode 100644 index 0000000..576a01c --- /dev/null +++ b/drivers/staging/hpfs/TODO @@ -0,0 +1,5 @@ +HPFS seems to have no remaining users, and it is getting +increasingly hard to maintain. It will be removed in one +of the next kernel releases unless someone puts effort +into fixing the locking. The new hpfs_lock that replaces +the BKL has not been tested. diff --git a/fs/hpfs/alloc.c b/drivers/staging/hpfs/alloc.c similarity index 100% rename from fs/hpfs/alloc.c rename to drivers/staging/hpfs/alloc.c diff --git a/fs/hpfs/anode.c b/drivers/staging/hpfs/anode.c similarity index 100% rename from fs/hpfs/anode.c rename to drivers/staging/hpfs/anode.c diff --git a/fs/hpfs/buffer.c b/drivers/staging/hpfs/buffer.c similarity index 100% rename from fs/hpfs/buffer.c rename to drivers/staging/hpfs/buffer.c diff --git a/fs/hpfs/dentry.c b/drivers/staging/hpfs/dentry.c similarity index 100% rename from fs/hpfs/dentry.c rename to drivers/staging/hpfs/dentry.c diff --git a/fs/hpfs/dir.c b/drivers/staging/hpfs/dir.c similarity index 100% rename from fs/hpfs/dir.c rename to drivers/staging/hpfs/dir.c diff --git a/fs/hpfs/dnode.c b/drivers/staging/hpfs/dnode.c similarity index 100% rename from fs/hpfs/dnode.c rename to drivers/staging/hpfs/dnode.c diff --git a/fs/hpfs/ea.c b/drivers/staging/hpfs/ea.c similarity index 100% rename from fs/hpfs/ea.c rename to drivers/staging/hpfs/ea.c diff --git a/fs/hpfs/file.c b/drivers/staging/hpfs/file.c similarity index 100% rename from fs/hpfs/file.c rename to drivers/staging/hpfs/file.c diff --git a/fs/hpfs/hpfs.h b/drivers/staging/hpfs/hpfs.h similarity index 100% rename from fs/hpfs/hpfs.h rename to drivers/staging/hpfs/hpfs.h diff --git a/fs/hpfs/hpfs_fn.h b/drivers/staging/hpfs/hpfs_fn.h similarity index 100% rename from fs/hpfs/hpfs_fn.h rename to drivers/staging/hpfs/hpfs_fn.h diff --git a/fs/hpfs/inode.c b/drivers/staging/hpfs/inode.c similarity index 100% rename from fs/hpfs/inode.c rename to drivers/staging/hpfs/inode.c diff --git a/fs/hpfs/map.c b/drivers/staging/hpfs/map.c similarity index 100% rename from fs/hpfs/map.c rename to drivers/staging/hpfs/map.c diff --git a/fs/hpfs/name.c b/drivers/staging/hpfs/name.c similarity index 100% rename from fs/hpfs/name.c rename to drivers/staging/hpfs/name.c diff --git a/fs/hpfs/namei.c b/drivers/staging/hpfs/namei.c similarity index 100% rename from fs/hpfs/namei.c rename to drivers/staging/hpfs/namei.c diff --git a/fs/hpfs/super.c b/drivers/staging/hpfs/super.c similarity index 100% rename from fs/hpfs/super.c rename to drivers/staging/hpfs/super.c diff --git a/fs/Kconfig b/fs/Kconfig index 3db9caa..5a54574 100644 --- a/fs/Kconfig +++ b/fs/Kconfig @@ -184,7 +184,6 @@ source "fs/squashfs/Kconfig" source "fs/freevxfs/Kconfig" source "fs/minix/Kconfig" source "fs/omfs/Kconfig" -source "fs/hpfs/Kconfig" source "fs/qnx4/Kconfig" source "fs/romfs/Kconfig" source "fs/sysv/Kconfig" diff --git a/fs/Makefile b/fs/Makefile index a7f7cef..c920ca9 100644 --- a/fs/Makefile +++ b/fs/Makefile @@ -90,7 +90,6 @@ obj-$(CONFIG_NLS) += nls/ obj-$(CONFIG_SYSV_FS) += sysv/ obj-$(CONFIG_CIFS) += cifs/ obj-$(CONFIG_NCP_FS) += ncpfs/ -obj-$(CONFIG_HPFS_FS) += hpfs/ obj-$(CONFIG_NTFS_FS) += ntfs/ obj-$(CONFIG_UFS_FS) += ufs/ obj-$(CONFIG_EFS_FS) += efs/ -- 1.7.1 ^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH 11/20] hpfs: move to drivers/staging 2011-01-25 22:17 ` [PATCH 11/20] hpfs: move to drivers/staging Arnd Bergmann @ 2011-02-07 16:17 ` Mikulas Patocka 2011-02-07 19:31 ` Arnd Bergmann 0 siblings, 1 reply; 14+ messages in thread From: Mikulas Patocka @ 2011-02-07 16:17 UTC (permalink / raw) To: Arnd Bergmann; +Cc: linux-kernel, linux-fsdevel Hey, I will solve it sometimes, but I am in a mental hospital now. Mikulas On Tue, 25 Jan 2011, Arnd Bergmann wrote: > hpfs has not seen a single patch from its maintainer > since the start of the git history, and the user base > seems to be completely gone after the end of OS/2. > > I have tried to keep the file system alive as much > as possible through the BKL removal, but this its > time seems to have come. If we can find an actual > user who is willing to test patches, or even a > maintainer that can work on the code, it can easily > be moved back into the main tree. > > If that does not happen, it will get removed from > the kernel tree after a few releases in staging/. > > Signed-off-by: Arnd Bergmann <arnd@arndb.de> > Cc: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz> > Cc: linux-fsdevel@vger.kernel.org > --- > MAINTAINERS | 2 +- > drivers/staging/Kconfig | 2 ++ > drivers/staging/Makefile | 1 + > {fs => drivers/staging}/hpfs/Kconfig | 3 +++ > {fs => drivers/staging}/hpfs/Makefile | 0 > drivers/staging/hpfs/TODO | 5 +++++ > {fs => drivers/staging}/hpfs/alloc.c | 0 > {fs => drivers/staging}/hpfs/anode.c | 0 > {fs => drivers/staging}/hpfs/buffer.c | 0 > {fs => drivers/staging}/hpfs/dentry.c | 0 > {fs => drivers/staging}/hpfs/dir.c | 0 > {fs => drivers/staging}/hpfs/dnode.c | 0 > {fs => drivers/staging}/hpfs/ea.c | 0 > {fs => drivers/staging}/hpfs/file.c | 0 > {fs => drivers/staging}/hpfs/hpfs.h | 0 > {fs => drivers/staging}/hpfs/hpfs_fn.h | 0 > {fs => drivers/staging}/hpfs/inode.c | 0 > {fs => drivers/staging}/hpfs/map.c | 0 > {fs => drivers/staging}/hpfs/name.c | 0 > {fs => drivers/staging}/hpfs/namei.c | 0 > {fs => drivers/staging}/hpfs/super.c | 0 > fs/Kconfig | 1 - > fs/Makefile | 1 - > 23 files changed, 12 insertions(+), 3 deletions(-) > rename {fs => drivers/staging}/hpfs/Kconfig (85%) > rename {fs => drivers/staging}/hpfs/Makefile (100%) > create mode 100644 drivers/staging/hpfs/TODO > rename {fs => drivers/staging}/hpfs/alloc.c (100%) > rename {fs => drivers/staging}/hpfs/anode.c (100%) > rename {fs => drivers/staging}/hpfs/buffer.c (100%) > rename {fs => drivers/staging}/hpfs/dentry.c (100%) > rename {fs => drivers/staging}/hpfs/dir.c (100%) > rename {fs => drivers/staging}/hpfs/dnode.c (100%) > rename {fs => drivers/staging}/hpfs/ea.c (100%) > rename {fs => drivers/staging}/hpfs/file.c (100%) > rename {fs => drivers/staging}/hpfs/hpfs.h (100%) > rename {fs => drivers/staging}/hpfs/hpfs_fn.h (100%) > rename {fs => drivers/staging}/hpfs/inode.c (100%) > rename {fs => drivers/staging}/hpfs/map.c (100%) > rename {fs => drivers/staging}/hpfs/name.c (100%) > rename {fs => drivers/staging}/hpfs/namei.c (100%) > rename {fs => drivers/staging}/hpfs/super.c (100%) > > diff --git a/MAINTAINERS b/MAINTAINERS > index 246ee22..fe5ca5f 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -3009,7 +3009,7 @@ HPFS FILESYSTEM > M: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz> > W: http://artax.karlin.mff.cuni.cz/~mikulas/vyplody/hpfs/index-e.cgi > S: Maintained > -F: fs/hpfs/ > +F: drivers/staging/hpfs/ > > HSO 3G MODEM DRIVER > M: Jan Dumon <j.dumon@option.com> > diff --git a/drivers/staging/Kconfig b/drivers/staging/Kconfig > index 6ac0418..9fc5aa6 100644 > --- a/drivers/staging/Kconfig > +++ b/drivers/staging/Kconfig > @@ -175,5 +175,7 @@ source "drivers/staging/cptm1217/Kconfig" > > source "drivers/staging/ste_rmi4/Kconfig" > > +source "drivers/staging/hpfs/Kconfig" > + > endif # !STAGING_EXCLUDE_BUILD > endif # STAGING > diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile > index a834d2e..878f381 100644 > --- a/drivers/staging/Makefile > +++ b/drivers/staging/Makefile > @@ -68,3 +68,4 @@ obj-$(CONFIG_SND_INTEL_SST) += intel_sst/ > obj-$(CONFIG_SPEAKUP) += speakup/ > obj-$(CONFIG_TOUCHSCREEN_CLEARPAD_TM1217) += cptm1217/ > obj-$(CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4) += ste_rmi4/ > +obj-$(CONFIG_HPFS_FS) += hpfs/ > diff --git a/fs/hpfs/Kconfig b/drivers/staging/hpfs/Kconfig > similarity index 85% > rename from fs/hpfs/Kconfig > rename to drivers/staging/hpfs/Kconfig > index 73476c1..f979319 100644 > --- a/fs/hpfs/Kconfig > +++ b/drivers/staging/hpfs/Kconfig > @@ -11,5 +11,8 @@ config HPFS_FS > option in order to be able to read them. Read > <file:Documentation/filesystems/hpfs.txt>. > > + The HPFS code is about to get removed from the kernel and is no > + longer supported on SMP or PREEMPT kernels. > + > To compile this file system support as a module, choose M here: the > module will be called hpfs. If unsure, say N. > diff --git a/fs/hpfs/Makefile b/drivers/staging/hpfs/Makefile > similarity index 100% > rename from fs/hpfs/Makefile > rename to drivers/staging/hpfs/Makefile > diff --git a/drivers/staging/hpfs/TODO b/drivers/staging/hpfs/TODO > new file mode 100644 > index 0000000..576a01c > --- /dev/null > +++ b/drivers/staging/hpfs/TODO > @@ -0,0 +1,5 @@ > +HPFS seems to have no remaining users, and it is getting > +increasingly hard to maintain. It will be removed in one > +of the next kernel releases unless someone puts effort > +into fixing the locking. The new hpfs_lock that replaces > +the BKL has not been tested. > diff --git a/fs/hpfs/alloc.c b/drivers/staging/hpfs/alloc.c > similarity index 100% > rename from fs/hpfs/alloc.c > rename to drivers/staging/hpfs/alloc.c > diff --git a/fs/hpfs/anode.c b/drivers/staging/hpfs/anode.c > similarity index 100% > rename from fs/hpfs/anode.c > rename to drivers/staging/hpfs/anode.c > diff --git a/fs/hpfs/buffer.c b/drivers/staging/hpfs/buffer.c > similarity index 100% > rename from fs/hpfs/buffer.c > rename to drivers/staging/hpfs/buffer.c > diff --git a/fs/hpfs/dentry.c b/drivers/staging/hpfs/dentry.c > similarity index 100% > rename from fs/hpfs/dentry.c > rename to drivers/staging/hpfs/dentry.c > diff --git a/fs/hpfs/dir.c b/drivers/staging/hpfs/dir.c > similarity index 100% > rename from fs/hpfs/dir.c > rename to drivers/staging/hpfs/dir.c > diff --git a/fs/hpfs/dnode.c b/drivers/staging/hpfs/dnode.c > similarity index 100% > rename from fs/hpfs/dnode.c > rename to drivers/staging/hpfs/dnode.c > diff --git a/fs/hpfs/ea.c b/drivers/staging/hpfs/ea.c > similarity index 100% > rename from fs/hpfs/ea.c > rename to drivers/staging/hpfs/ea.c > diff --git a/fs/hpfs/file.c b/drivers/staging/hpfs/file.c > similarity index 100% > rename from fs/hpfs/file.c > rename to drivers/staging/hpfs/file.c > diff --git a/fs/hpfs/hpfs.h b/drivers/staging/hpfs/hpfs.h > similarity index 100% > rename from fs/hpfs/hpfs.h > rename to drivers/staging/hpfs/hpfs.h > diff --git a/fs/hpfs/hpfs_fn.h b/drivers/staging/hpfs/hpfs_fn.h > similarity index 100% > rename from fs/hpfs/hpfs_fn.h > rename to drivers/staging/hpfs/hpfs_fn.h > diff --git a/fs/hpfs/inode.c b/drivers/staging/hpfs/inode.c > similarity index 100% > rename from fs/hpfs/inode.c > rename to drivers/staging/hpfs/inode.c > diff --git a/fs/hpfs/map.c b/drivers/staging/hpfs/map.c > similarity index 100% > rename from fs/hpfs/map.c > rename to drivers/staging/hpfs/map.c > diff --git a/fs/hpfs/name.c b/drivers/staging/hpfs/name.c > similarity index 100% > rename from fs/hpfs/name.c > rename to drivers/staging/hpfs/name.c > diff --git a/fs/hpfs/namei.c b/drivers/staging/hpfs/namei.c > similarity index 100% > rename from fs/hpfs/namei.c > rename to drivers/staging/hpfs/namei.c > diff --git a/fs/hpfs/super.c b/drivers/staging/hpfs/super.c > similarity index 100% > rename from fs/hpfs/super.c > rename to drivers/staging/hpfs/super.c > diff --git a/fs/Kconfig b/fs/Kconfig > index 3db9caa..5a54574 100644 > --- a/fs/Kconfig > +++ b/fs/Kconfig > @@ -184,7 +184,6 @@ source "fs/squashfs/Kconfig" > source "fs/freevxfs/Kconfig" > source "fs/minix/Kconfig" > source "fs/omfs/Kconfig" > -source "fs/hpfs/Kconfig" > source "fs/qnx4/Kconfig" > source "fs/romfs/Kconfig" > source "fs/sysv/Kconfig" > diff --git a/fs/Makefile b/fs/Makefile > index a7f7cef..c920ca9 100644 > --- a/fs/Makefile > +++ b/fs/Makefile > @@ -90,7 +90,6 @@ obj-$(CONFIG_NLS) += nls/ > obj-$(CONFIG_SYSV_FS) += sysv/ > obj-$(CONFIG_CIFS) += cifs/ > obj-$(CONFIG_NCP_FS) += ncpfs/ > -obj-$(CONFIG_HPFS_FS) += hpfs/ > obj-$(CONFIG_NTFS_FS) += ntfs/ > obj-$(CONFIG_UFS_FS) += ufs/ > obj-$(CONFIG_EFS_FS) += efs/ > -- > 1.7.1 > ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 11/20] hpfs: move to drivers/staging 2011-02-07 16:17 ` Mikulas Patocka @ 2011-02-07 19:31 ` Arnd Bergmann 0 siblings, 0 replies; 14+ messages in thread From: Arnd Bergmann @ 2011-02-07 19:31 UTC (permalink / raw) To: Mikulas Patocka; +Cc: linux-kernel, linux-fsdevel On Monday 07 February 2011 17:17:37 Mikulas Patocka wrote: > > Hey, I will solve it sometimes, but I am in a mental hospital now. Hi Mikulas, Good to hear that you are still interested in the code. I'll make sure we don't just remove it then, but I suppose we can still mark it as non-SMP in the meantime. I hope you get well soon, Arnd ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [RFC 00/20] Proposal for remaining BKL users 2011-01-25 22:17 [RFC 00/20] Proposal for remaining BKL users Arnd Bergmann ` (2 preceding siblings ...) 2011-01-25 22:17 ` [PATCH 11/20] hpfs: move to drivers/staging Arnd Bergmann @ 2011-01-26 2:22 ` Greg KH 2011-01-26 11:31 ` Arnd Bergmann 3 siblings, 1 reply; 14+ messages in thread From: Greg KH @ 2011-01-26 2:22 UTC (permalink / raw) To: Arnd Bergmann Cc: Mauro Carvalho Chehab, Frederic Weisbecker, dri-devel, Mikulas Patocka, H. Peter Anvin, Ian Kent, linux-cifs, Nick Bowler, linux-x25, Takahiro Hirofuchi, Ross Cohen, Arnaldo Carvalho de Melo, Evgeniy Dushistov, Stuart Swales, Thomas Gleixner, Arjan van de Ven, autofs, Jeff Layton, netdev, linux-kernel, Palash Bandyopadhyay, linux-fsdevel, Andrew Morton On Tue, Jan 25, 2011 at 11:17:14PM +0100, Arnd Bergmann wrote: > I've gone through all the code in the kernel that > uses the big kernel lock and come up with a solution > that seems at least half-reasonable for each of them. > > The decisions are somewhat arbitrary, but here is > what I'd suggest we do: > > * Remove in 2.6.39: > i830, autofs3, smbfs I thought some people really wanted to keep i830. Or was that i810? I'll drop autofs3 and smbfs, thanks. > * Move to staging now, kill in 2.6.41 (or later): > appletalk, hpfs Sounds good to me. > * Work around in an ugly way, but keep alive: > * ufs, ipx, i810, cx25721 > > * Fix properly: > * usbip, go7007, adfs, x25 Thanks for the usbip and go7007 patches, I'll queue them up. greg k-h ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [RFC 00/20] Proposal for remaining BKL users 2011-01-26 2:22 ` [RFC 00/20] Proposal for remaining BKL users Greg KH @ 2011-01-26 11:31 ` Arnd Bergmann 2011-01-26 11:58 ` Mauro Carvalho Chehab 0 siblings, 1 reply; 14+ messages in thread From: Arnd Bergmann @ 2011-01-26 11:31 UTC (permalink / raw) To: Greg KH Cc: Mauro Carvalho Chehab, Frederic Weisbecker, dri-devel, Mikulas Patocka, H. Peter Anvin, Ian Kent, linux-cifs, Nick Bowler, linux-x25, Takahiro Hirofuchi, Ross Cohen, Arnaldo Carvalho de Melo, Evgeniy Dushistov, Stuart Swales, Thomas Gleixner, Arjan van de Ven, autofs, Jeff Layton, netdev, linux-kernel, Palash Bandyopadhyay, linux-fsdevel, Andrew Morton On Wednesday 26 January 2011, Greg KH wrote: > On Tue, Jan 25, 2011 at 11:17:14PM +0100, Arnd Bergmann wrote: > > I've gone through all the code in the kernel that > > uses the big kernel lock and come up with a solution > > that seems at least half-reasonable for each of them. > > > > The decisions are somewhat arbitrary, but here is > > what I'd suggest we do: > > > > * Remove in 2.6.39: > > i830, autofs3, smbfs > > I thought some people really wanted to keep i830. Or was that i810? > I'll drop autofs3 and smbfs, thanks. i810 needs to be kept, i830 is obsolete, see the patch changelogs there. I assume that Dave Airlie will take both patches (i810 BKL removal and i830 removal) into his 2.6.39 queue. > > * Work around in an ugly way, but keep alive: > > * ufs, ipx, i810, cx25721 > > > > * Fix properly: > > * usbip, go7007, adfs, x25 > > Thanks for the usbip and go7007 patches, I'll queue them up. It would be good if you could also take the cx25721 patch. It's not the nicest one I've done, but it's a bug fix nonetheless. Thanks, Arnd ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [RFC 00/20] Proposal for remaining BKL users 2011-01-26 11:31 ` Arnd Bergmann @ 2011-01-26 11:58 ` Mauro Carvalho Chehab 2011-01-26 13:45 ` Arnd Bergmann 0 siblings, 1 reply; 14+ messages in thread From: Mauro Carvalho Chehab @ 2011-01-26 11:58 UTC (permalink / raw) To: Arnd Bergmann Cc: Frederic Weisbecker, dri-devel, Mikulas Patocka, H. Peter Anvin, Ian Kent, linux-cifs, Nick Bowler, linux-x25, Takahiro Hirofuchi, Palash Bandyopadhyay, Ross Cohen, Arnaldo Carvalho de Melo, Evgeniy Dushistov, Stuart Swales, Thomas Gleixner, Arjan van de Ven, autofs, Jeff Layton, netdev, Greg KH, linux-kernel, Palash Bandyopadhyay, linux-fsdevel Em 26-01-2011 09:31, Arnd Bergmann escreveu: > On Wednesday 26 January 2011, Greg KH wrote: >> On Tue, Jan 25, 2011 at 11:17:14PM +0100, Arnd Bergmann wrote: >>> I've gone through all the code in the kernel that >>> uses the big kernel lock and come up with a solution >>> that seems at least half-reasonable for each of them. >>> >>> The decisions are somewhat arbitrary, but here is >>> what I'd suggest we do: >>> >>> * Remove in 2.6.39: >>> i830, autofs3, smbfs >> >> I thought some people really wanted to keep i830. Or was that i810? >> I'll drop autofs3 and smbfs, thanks. > > i810 needs to be kept, i830 is obsolete, see the patch changelogs > there. I assume that Dave Airlie will take both patches (i810 BKL > removal and i830 removal) into his 2.6.39 queue. > >>> * Work around in an ugly way, but keep alive: >>> * ufs, ipx, i810, cx25721 >>> >>> * Fix properly: >>> * usbip, go7007, adfs, x25 >> >> Thanks for the usbip and go7007 patches, I'll queue them up. > > It would be good if you could also take the cx25721 patch. It's > not the nicest one I've done, but it's a bug fix nonetheless. I guess you're meaning cx25821, right? Palash should take a look on it and review. This is a device that allows 12 simultaneous streams, so, I suspect that he'll need to do some changes at the locking schema, to avoid performance bottlenecks. Cheers, Mauro ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [RFC 00/20] Proposal for remaining BKL users 2011-01-26 11:58 ` Mauro Carvalho Chehab @ 2011-01-26 13:45 ` Arnd Bergmann 2011-01-26 16:24 ` Palash Bandyopadhyay 0 siblings, 1 reply; 14+ messages in thread From: Arnd Bergmann @ 2011-01-26 13:45 UTC (permalink / raw) To: Mauro Carvalho Chehab Cc: Frederic Weisbecker, dri-devel, Mikulas Patocka, H. Peter Anvin, Ian Kent, linux-cifs, Nick Bowler, linux-x25, Takahiro Hirofuchi, Ross Cohen, Arnaldo Carvalho de Melo, Evgeniy Dushistov, Stuart Swales, Thomas Gleixner, Arjan van de Ven, autofs, Jeff Layton, netdev, Greg KH, linux-kernel, Palash Bandyopadhyay, linux-fsdevel, Andrew Morton, Andrew On Wednesday 26 January 2011, Mauro Carvalho Chehab wrote: > I guess you're meaning cx25821, right? Right, sorry for the typo. > Palash should take a look on it and review. This is a device that allows > 12 simultaneous streams, so, I suspect that he'll need to do some > changes at the locking schema, to avoid performance bottlenecks. I would be surprised if there was any measurable performance change. The BKL was used only in the open() function to iterate the device list, and that code is nowhere on a critical path, as far as I can tell. Arnd ^ permalink raw reply [flat|nested] 14+ messages in thread
* RE: [RFC 00/20] Proposal for remaining BKL users 2011-01-26 13:45 ` Arnd Bergmann @ 2011-01-26 16:24 ` Palash Bandyopadhyay 0 siblings, 0 replies; 14+ messages in thread From: Palash Bandyopadhyay @ 2011-01-26 16:24 UTC (permalink / raw) To: Arnd Bergmann, Mauro Carvalho Chehab Cc: Frederic Weisbecker, dri-devel@lists.freedesktop.org, Mikulas Patocka, H. Peter Anvin, Ian Kent, linux-cifs@vger.kernel.org, Nick Bowler, linux-x25@vger.kernel.org, Takahiro Hirofuchi, Ross Cohen, Arnaldo Carvalho de Melo, Evgeniy Dushistov, Stuart Swales, Thomas Gleixner, Arjan van de Ven, autofs@linux.kernel.org, Jeff Layton, netdev@vger.kernel.org, Greg KH, "linux-kernel@vger.ker I think it should be ok. If we do hit any performance issue, we'll revisit this. Thanks, Palash -----Original Message----- From: Arnd Bergmann [mailto:arnd@arndb.de] Sent: Wednesday, January 26, 2011 5:45 AM To: Mauro Carvalho Chehab Cc: Greg KH; linux-kernel@vger.kernel.org; Andrew Hendry; Andrew Morton; Arjan van de Ven; Arnaldo Carvalho de Melo; autofs@linux.kernel.org; Chris Wilson; Dave Airlie; dri-devel@lists.freedesktop.org; Evgeniy Dushistov; Frederic Weisbecker; H. Peter Anvin; Ian Kent; Ingo Molnar; Jeff Layton; linux-cifs@vger.kernel.org; linux-fsdevel@vger.kernel.org; linux-x25@vger.kernel.org; Mikulas Patocka; netdev@vger.kernel.org; Nick Bowler; Palash Bandyopadhyay; Ross Cohen; Russell King; Stuart Swales; Takahiro Hirofuchi; Thomas Gleixner Subject: Re: [RFC 00/20] Proposal for remaining BKL users On Wednesday 26 January 2011, Mauro Carvalho Chehab wrote: > I guess you're meaning cx25821, right? Right, sorry for the typo. > Palash should take a look on it and review. This is a device that allows > 12 simultaneous streams, so, I suspect that he'll need to do some > changes at the locking schema, to avoid performance bottlenecks. I would be surprised if there was any measurable performance change. The BKL was used only in the open() function to iterate the device list, and that code is nowhere on a critical path, as far as I can tell. Arnd Conexant E-mail Firewall (Conexant.Com) made the following annotations --------------------------------------------------------------------- ********************** Legal Disclaimer **************************** "This email may contain confidential and privileged material for the sole use of the intended recipient. Any unauthorized review, use or distribution by others is strictly prohibited. If you have received the message in error, please advise the sender by reply email and delete the message. Thank you." ********************************************************************** --------------------------------------------------------------------- ^ permalink raw reply [flat|nested] 14+ messages in thread
* [RFC 00/20] Proposal for remaining BKL users @ 2011-01-25 22:22 Arnd Bergmann 0 siblings, 0 replies; 14+ messages in thread From: Arnd Bergmann @ 2011-01-25 22:22 UTC (permalink / raw) To: linux-kernel Cc: autofs, linux-cifs, linux-x25, Arnd Bergmann, netdev, dri-devel, linux-fsdevel I've gone through all the code in the kernel that uses the big kernel lock and come up with a solution that seems at least half-reasonable for each of them. The decisions are somewhat arbitrary, but here is what I'd suggest we do: * Remove in 2.6.39: i830, autofs3, smbfs * Move to staging now, kill in 2.6.41 (or later): appletalk, hpfs * Work around in an ugly way, but keep alive: * ufs, ipx, i810, cx25721 * Fix properly: * usbip, go7007, adfs, x25 Some of the patches are rather tricky and I haven't really done much proper testing, so I'd much prefer the maintainers to pick up the patches and do the necessary testing where possible, or even come up with a better solution. Arnd Bergmann (20): drm/i810: remove the BKL drm: remove i830 driver staging/usbip: convert to kthread staging/cx25721: serialize access to devlist staging/go7007: remove the BKL staging: Remove autofs3 staging: remove smbfs adfs: remove the big kernel lock hpfs: rename big kernel lock to hpfs_lock hpfs: replace BKL with a global mutex hpfs: move to drivers/staging x25: remove the BKL appletalk: move to staging staging/appletalk: remove the BKL ufs: remove the BKL ipx: remove the BKL tracing: don't trace the BKL rtmutex-tester: remove BKL tests drivers: remove extraneous includes of smp_lock.h BKL: That's all, folks MAINTAINERS | 11 +- drivers/gpu/drm/Kconfig | 47 +- drivers/gpu/drm/Makefile | 1 - drivers/gpu/drm/i810/i810_dma.c | 18 +- drivers/gpu/drm/i810/i810_drv.c | 6 +- drivers/gpu/drm/i830/Makefile | 8 - drivers/gpu/drm/i830/i830_dma.c | 1560 --------- drivers/gpu/drm/i830/i830_drv.c | 107 - drivers/gpu/drm/i830/i830_drv.h | 295 -- drivers/gpu/drm/i830/i830_irq.c | 186 -- drivers/net/Makefile | 1 - drivers/net/appletalk/Makefile | 7 - drivers/scsi/megaraid/megaraid_sas_fp.c | 1 - drivers/scsi/megaraid/megaraid_sas_fusion.c | 1 - drivers/staging/Kconfig | 8 +- drivers/staging/Makefile | 4 +- drivers/{net => staging}/appletalk/Kconfig | 1 - {net => drivers/staging}/appletalk/Makefile | 7 +- {net => drivers/staging}/appletalk/aarp.c | 2 +- .../linux => drivers/staging/appletalk}/atalk.h | 0 {net => drivers/staging}/appletalk/atalk_proc.c | 2 +- drivers/{net => staging}/appletalk/cops.c | 2 +- drivers/{net => staging}/appletalk/cops.h | 0 drivers/{net => staging}/appletalk/cops_ffdrv.h | 0 drivers/{net => staging}/appletalk/cops_ltdrv.h | 0 {net => drivers/staging}/appletalk/ddp.c | 44 +- {net => drivers/staging}/appletalk/dev.c | 0 drivers/{net => staging}/appletalk/ipddp.c | 2 +- drivers/{net => staging}/appletalk/ipddp.h | 0 drivers/{net => staging}/appletalk/ltpc.c | 2 +- drivers/{net => staging}/appletalk/ltpc.h | 0 .../staging}/appletalk/sysctl_net_atalk.c | 2 +- drivers/staging/autofs/Kconfig | 22 - drivers/staging/autofs/Makefile | 7 - drivers/staging/autofs/TODO | 8 - drivers/staging/autofs/autofs_i.h | 165 - drivers/staging/autofs/dirhash.c | 260 -- drivers/staging/autofs/init.c | 52 - drivers/staging/autofs/inode.c | 288 -- drivers/staging/autofs/root.c | 648 ---- drivers/staging/autofs/symlink.c | 26 - drivers/staging/autofs/waitq.c | 205 -- drivers/staging/cx25821/Kconfig | 1 - drivers/staging/cx25821/cx25821-alsa.c | 2 + drivers/staging/cx25821/cx25821-core.c | 16 +- drivers/staging/cx25821/cx25821-video.c | 9 +- drivers/staging/cx25821/cx25821.h | 3 +- drivers/staging/easycap/easycap.h | 1 - drivers/staging/easycap/easycap_ioctl.c | 1 - drivers/staging/go7007/Kconfig | 1 - drivers/staging/go7007/s2250-loader.c | 3 - {fs => drivers/staging}/hpfs/Kconfig | 5 +- {fs => drivers/staging}/hpfs/Makefile | 0 drivers/staging/hpfs/TODO | 5 + {fs => drivers/staging}/hpfs/alloc.c | 0 {fs => drivers/staging}/hpfs/anode.c | 0 {fs => drivers/staging}/hpfs/buffer.c | 0 {fs => drivers/staging}/hpfs/dentry.c | 0 {fs => drivers/staging}/hpfs/dir.c | 23 +- {fs => drivers/staging}/hpfs/dnode.c | 0 {fs => drivers/staging}/hpfs/ea.c | 0 {fs => drivers/staging}/hpfs/file.c | 9 +- {fs => drivers/staging}/hpfs/hpfs.h | 0 {fs => drivers/staging}/hpfs/hpfs_fn.h | 36 + {fs => drivers/staging}/hpfs/inode.c | 9 +- {fs => drivers/staging}/hpfs/map.c | 0 {fs => drivers/staging}/hpfs/name.c | 0 {fs => drivers/staging}/hpfs/namei.c | 49 +- {fs => drivers/staging}/hpfs/super.c | 21 +- drivers/staging/smbfs/Kconfig | 56 - drivers/staging/smbfs/Makefile | 18 - drivers/staging/smbfs/TODO | 8 - drivers/staging/smbfs/cache.c | 208 -- drivers/staging/smbfs/dir.c | 699 ---- drivers/staging/smbfs/file.c | 456 --- drivers/staging/smbfs/getopt.c | 64 - drivers/staging/smbfs/getopt.h | 14 - drivers/staging/smbfs/inode.c | 854 ----- drivers/staging/smbfs/ioctl.c | 68 - drivers/staging/smbfs/proc.c | 3502 -------------------- drivers/staging/smbfs/proto.h | 89 - drivers/staging/smbfs/request.c | 817 ----- drivers/staging/smbfs/request.h | 70 - drivers/staging/smbfs/smb.h | 118 - drivers/staging/smbfs/smb_debug.h | 34 - drivers/staging/smbfs/smb_fs.h | 153 - drivers/staging/smbfs/smb_fs_i.h | 37 - drivers/staging/smbfs/smb_fs_sb.h | 100 - drivers/staging/smbfs/smb_mount.h | 65 - drivers/staging/smbfs/smbfs.txt | 8 - drivers/staging/smbfs/smbiod.c | 343 -- drivers/staging/smbfs/smbno.h | 363 -- drivers/staging/smbfs/sock.c | 385 --- drivers/staging/smbfs/symlink.c | 67 - drivers/staging/usbip/Kconfig | 2 +- drivers/staging/usbip/stub.h | 4 +- drivers/staging/usbip/stub_dev.c | 13 +- drivers/staging/usbip/stub_rx.c | 13 +- drivers/staging/usbip/stub_tx.c | 14 +- drivers/staging/usbip/usbip_common.c | 105 - drivers/staging/usbip/usbip_common.h | 20 +- drivers/staging/usbip/usbip_event.c | 31 +- drivers/staging/usbip/vhci.h | 4 +- drivers/staging/usbip/vhci_hcd.c | 10 +- drivers/staging/usbip/vhci_rx.c | 16 +- drivers/staging/usbip/vhci_sysfs.c | 9 +- drivers/staging/usbip/vhci_tx.c | 14 +- drivers/target/target_core_device.c | 1 - drivers/target/target_core_fabric_lib.c | 1 - drivers/target/target_core_file.c | 1 - drivers/target/target_core_hba.c | 1 - drivers/target/target_core_iblock.c | 1 - drivers/target/target_core_pscsi.c | 1 - drivers/target/target_core_rd.c | 1 - drivers/target/target_core_tpg.c | 1 - drivers/target/target_core_transport.c | 1 - drivers/tty/n_hdlc.c | 1 - drivers/tty/n_r3964.c | 1 - drivers/tty/pty.c | 1 - drivers/tty/tty_io.c | 1 - drivers/tty/tty_ldisc.c | 2 - drivers/tty/vt/selection.c | 1 - drivers/tty/vt/vc_screen.c | 1 - drivers/tty/vt/vt.c | 1 - drivers/tty/vt/vt_ioctl.c | 1 - fs/Kconfig | 1 - fs/Makefile | 1 - fs/adfs/Kconfig | 1 - fs/adfs/dir.c | 6 - fs/adfs/inode.c | 6 - fs/adfs/super.c | 13 +- fs/compat_ioctl.c | 1 - fs/ufs/Kconfig | 1 - fs/ufs/inode.c | 78 +- fs/ufs/namei.c | 35 +- fs/ufs/super.c | 55 +- fs/ufs/truncate.c | 5 +- fs/ufs/ufs.h | 6 +- include/drm/Kbuild | 1 - include/drm/i830_drm.h | 342 -- include/linux/Kbuild | 1 - include/linux/hardirq.h | 9 +- include/linux/smp_lock.h | 65 - include/trace/events/bkl.h | 61 - init/Kconfig | 5 - kernel/rtmutex-tester.c | 39 +- kernel/sched.c | 7 - lib/Makefile | 1 - lib/kernel_lock.c | 143 - net/Kconfig | 1 - net/Makefile | 1 - net/ipx/Kconfig | 1 - net/ipx/af_ipx.c | 52 +- net/socket.c | 1 - net/x25/Kconfig | 1 - net/x25/af_x25.c | 61 +- net/x25/x25_out.c | 7 +- 157 files changed, 356 insertions(+), 13722 deletions(-) delete mode 100644 drivers/gpu/drm/i830/Makefile delete mode 100644 drivers/gpu/drm/i830/i830_dma.c delete mode 100644 drivers/gpu/drm/i830/i830_drv.c delete mode 100644 drivers/gpu/drm/i830/i830_drv.h delete mode 100644 drivers/gpu/drm/i830/i830_irq.c delete mode 100644 drivers/net/appletalk/Makefile rename drivers/{net => staging}/appletalk/Kconfig (98%) rename {net => drivers/staging}/appletalk/Makefile (56%) rename {net => drivers/staging}/appletalk/aarp.c (99%) rename {include/linux => drivers/staging/appletalk}/atalk.h (100%) rename {net => drivers/staging}/appletalk/atalk_proc.c (99%) rename drivers/{net => staging}/appletalk/cops.c (99%) rename drivers/{net => staging}/appletalk/cops.h (100%) rename drivers/{net => staging}/appletalk/cops_ffdrv.h (100%) rename drivers/{net => staging}/appletalk/cops_ltdrv.h (100%) rename {net => drivers/staging}/appletalk/ddp.c (98%) rename {net => drivers/staging}/appletalk/dev.c (100%) rename drivers/{net => staging}/appletalk/ipddp.c (99%) rename drivers/{net => staging}/appletalk/ipddp.h (100%) rename drivers/{net => staging}/appletalk/ltpc.c (99%) rename drivers/{net => staging}/appletalk/ltpc.h (100%) rename {net => drivers/staging}/appletalk/sysctl_net_atalk.c (98%) delete mode 100644 drivers/staging/autofs/Kconfig delete mode 100644 drivers/staging/autofs/Makefile delete mode 100644 drivers/staging/autofs/TODO delete mode 100644 drivers/staging/autofs/autofs_i.h delete mode 100644 drivers/staging/autofs/dirhash.c delete mode 100644 drivers/staging/autofs/init.c delete mode 100644 drivers/staging/autofs/inode.c delete mode 100644 drivers/staging/autofs/root.c delete mode 100644 drivers/staging/autofs/symlink.c delete mode 100644 drivers/staging/autofs/waitq.c rename {fs => drivers/staging}/hpfs/Kconfig (80%) rename {fs => drivers/staging}/hpfs/Makefile (100%) create mode 100644 drivers/staging/hpfs/TODO rename {fs => drivers/staging}/hpfs/alloc.c (100%) rename {fs => drivers/staging}/hpfs/anode.c (100%) rename {fs => drivers/staging}/hpfs/buffer.c (100%) rename {fs => drivers/staging}/hpfs/dentry.c (100%) rename {fs => drivers/staging}/hpfs/dir.c (97%) rename {fs => drivers/staging}/hpfs/dnode.c (100%) rename {fs => drivers/staging}/hpfs/ea.c (100%) rename {fs => drivers/staging}/hpfs/file.c (97%) rename {fs => drivers/staging}/hpfs/hpfs.h (100%) rename {fs => drivers/staging}/hpfs/hpfs_fn.h (91%) rename {fs => drivers/staging}/hpfs/inode.c (98%) rename {fs => drivers/staging}/hpfs/map.c (100%) rename {fs => drivers/staging}/hpfs/name.c (100%) rename {fs => drivers/staging}/hpfs/namei.c (96%) rename {fs => drivers/staging}/hpfs/super.c (98%) delete mode 100644 drivers/staging/smbfs/Kconfig delete mode 100644 drivers/staging/smbfs/Makefile delete mode 100644 drivers/staging/smbfs/TODO delete mode 100644 drivers/staging/smbfs/cache.c delete mode 100644 drivers/staging/smbfs/dir.c delete mode 100644 drivers/staging/smbfs/file.c delete mode 100644 drivers/staging/smbfs/getopt.c delete mode 100644 drivers/staging/smbfs/getopt.h delete mode 100644 drivers/staging/smbfs/inode.c delete mode 100644 drivers/staging/smbfs/ioctl.c delete mode 100644 drivers/staging/smbfs/proc.c delete mode 100644 drivers/staging/smbfs/proto.h delete mode 100644 drivers/staging/smbfs/request.c delete mode 100644 drivers/staging/smbfs/request.h delete mode 100644 drivers/staging/smbfs/smb.h delete mode 100644 drivers/staging/smbfs/smb_debug.h delete mode 100644 drivers/staging/smbfs/smb_fs.h delete mode 100644 drivers/staging/smbfs/smb_fs_i.h delete mode 100644 drivers/staging/smbfs/smb_fs_sb.h delete mode 100644 drivers/staging/smbfs/smb_mount.h delete mode 100644 drivers/staging/smbfs/smbfs.txt delete mode 100644 drivers/staging/smbfs/smbiod.c delete mode 100644 drivers/staging/smbfs/smbno.h delete mode 100644 drivers/staging/smbfs/sock.c delete mode 100644 drivers/staging/smbfs/symlink.c delete mode 100644 include/drm/i830_drm.h delete mode 100644 include/linux/smp_lock.h delete mode 100644 include/trace/events/bkl.h delete mode 100644 lib/kernel_lock.c [re-sent to mailing lists, due to overly long Cc list getting rejected by vger] Cc: autofs@linux.kernel.org Cc: dri-devel@lists.freedesktop.org Cc: linux-cifs@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org Cc: linux-x25@vger.kernel.org Cc: netdev@vger.kernel.org ^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2011-02-07 19:31 UTC | newest] Thread overview: 14+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-01-25 22:17 [RFC 00/20] Proposal for remaining BKL users Arnd Bergmann 2011-01-25 22:17 ` [PATCH 09/20] hpfs: rename big kernel lock to hpfs_lock Arnd Bergmann 2011-01-25 22:17 ` [PATCH 10/20] hpfs: replace BKL with a global mutex Arnd Bergmann 2011-01-26 0:15 ` Andi Kleen [not found] ` <m2ipxc34aq.fsf@linux.intel.com> 2011-01-26 12:48 ` [PATCH v2] hpfs: remove the BKL Arnd Bergmann 2011-01-25 22:17 ` [PATCH 11/20] hpfs: move to drivers/staging Arnd Bergmann 2011-02-07 16:17 ` Mikulas Patocka 2011-02-07 19:31 ` Arnd Bergmann 2011-01-26 2:22 ` [RFC 00/20] Proposal for remaining BKL users Greg KH 2011-01-26 11:31 ` Arnd Bergmann 2011-01-26 11:58 ` Mauro Carvalho Chehab 2011-01-26 13:45 ` Arnd Bergmann 2011-01-26 16:24 ` Palash Bandyopadhyay -- strict thread matches above, loose matches on Subject: below -- 2011-01-25 22:22 Arnd Bergmann
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).