===== ChangeSet 1.1587.5.5 vs 1.1587.5.6 ===== --- 1.1587.5.5/ChangeSet 2004-04-28 06:39:46 +02:00 +++ 1.1587.5.6/ChangeSet 2004-04-28 06:45:34 +02:00 @@ -1,3 +1,10 @@ +hch@dhcp212.munich.sgi.com|fs/xfs/pagebuf/page_buf.h|20020911181210|62023|a708960bf9d686dc hch@sgi.com|fs/xfs/linux/xfs_buf.h|20040428044514|09029 +hch@dhcp212.munich.sgi.com|fs/xfs/linux/xfs_super.c|20020911181207|00374|bec0c19323e55230 hch@sgi.com|fs/xfs/linux/xfs_super.c|20040428044514|21726 +hch@dhcp212.munich.sgi.com|fs/xfs/xfs_vfsops.c|20020911181256|29993|cb811930b087d597 hch@sgi.com|fs/xfs/xfs_vfsops.c|20040428044514|39524 +hch@dhcp212.munich.sgi.com|fs/xfs/linux/xfs_super.h|20020911181207|33243|94f8917ed1d6e129 hch@sgi.com|fs/xfs/linux/xfs_super.h|20040428044514|49126 +hch@dhcp212.munich.sgi.com|fs/xfs/xfs_mount.c|20020911181247|03185|bb5c9880c3044af hch@sgi.com|fs/xfs/xfs_mount.c|20040428044514|29879 +hch@dhcp212.munich.sgi.com|fs/xfs/pagebuf/page_buf.c|20020911181210|29475|cad79a273705caa2 hch@sgi.com|fs/xfs/linux/xfs_buf.c|20040428044514|49930 +hch@dhcp212.munich.sgi.com|fs/xfs/linux/xfs_linux.h|20020911181206|04059|7b5ea161a7eaa95a hch@sgi.com|fs/xfs/linux/xfs_linux.h|20040428044514|05102 hch@dhcp212.munich.sgi.com|fs/xfs/linux/xfs_file.c|20020911181203|38697|df8014aebf21c911 roehrich@sgi.com|fs/xfs/linux/xfs_file.c|20040428043927|32254 torvalds@athlon.transmeta.com|Makefile|20020205173938|00876|d6ad9c1a8d595a5 torvalds@ppc970.osdl.org|Makefile|20040428013115|15671 akpm@osdl.org[torvalds]|include/asm-generic/cpumask_arith.h|20030819034349|14038|60abfed510eafce rusty@rustcorp.com.au[torvalds]|include/asm-generic/cpumask_arith.h|20040428013045|08696 @@ -345,10 +352,8 @@ axboe@burns.home.kernel.dk|drivers/ide/ide-probe.c|20020816120714|30220|b579fbd2789bf365 B.Zolnierkiewicz@elka.pw.edu.pl[torvalds]|drivers/ide/ide-probe.c|20040421231548|04058 axboe@burns.home.kernel.dk|drivers/ide/ide-disk.c|20020816120714|25255|e003b6a3d0f154e3 B.Zolnierkiewicz@elka.pw.edu.pl[torvalds]|drivers/ide/ide-disk.c|20040421231536|23576 zippel@linux-m68k.org[torvalds]|drivers/serial/Kconfig|20021030043234|04830|36bd1e2df55d02ce torvalds@ppc970.osdl.org|drivers/serial/Kconfig|20040421231322|01681 -hch@dhcp212.munich.sgi.com|fs/xfs/xfs_vfsops.c|20020911181256|29993|cb811930b087d597 nathans@sgi.com|fs/xfs/xfs_vfsops.c|20040421224735|40626 hch@dhcp212.munich.sgi.com|fs/xfs/linux/xfs_ioctl.c|20020911181205|07616|320df5df8fb887d1 nathans@sgi.com|fs/xfs/linux/xfs_ioctl.c|20040421224735|60144 hch@dhcp212.munich.sgi.com|fs/xfs/linux/xfs_lrw.c|20020911181206|36049|b8affbbdff171e8f nathans@sgi.com|fs/xfs/linux/xfs_lrw.c|20040421224735|09762 -hch@dhcp212.munich.sgi.com|fs/xfs/linux/xfs_super.c|20020911181207|00374|bec0c19323e55230 nathans@sgi.com|fs/xfs/linux/xfs_super.c|20040421224735|62884 rmk@flint.arm.linux.org.uk|include/asm-arm/arch-versatile/param.h|20040421223110|20976|84f45a177fda00ba rmk@flint.arm.linux.org.uk|include/asm-arm/arch-versatile/param.h|20040421223111|01671 rmk@flint.arm.linux.org.uk|include/asm-arm/arch-versatile/memory.h|20040421223104|59552|c2e2a6a33d29ed8d rmk@flint.arm.linux.org.uk|include/asm-arm/arch-versatile/memory.h|20040421223105|23241 rmk@flint.arm.linux.org.uk|arch/arm/mach-versatile/core.c|20040421223020|38831|a172d30fe460505d rmk@flint.arm.linux.org.uk|arch/arm/mach-versatile/core.c|20040421223021|16552 @@ -369,7 +374,6 @@ rmk@flint.arm.linux.org.uk|include/asm-arm/arch-versatile/hardware.h|20040421223039|30496|4d675922390f3908 rmk@flint.arm.linux.org.uk|include/asm-arm/arch-versatile/hardware.h|20040421223040|60823 rmk@flint.arm.linux.org.uk|include/asm-arm/arch-versatile/time.h|20040421223135|17260|c344b24f8045f7dc rmk@flint.arm.linux.org.uk|include/asm-arm/arch-versatile/time.h|20040421223136|52008 rmk@flint.arm.linux.org.uk|arch/arm/mach-versatile/Makefile|20040421223008|03231|3746ef682bcd267 rmk@flint.arm.linux.org.uk|arch/arm/mach-versatile/Makefile|20040421223009|04267 -hch@dhcp212.munich.sgi.com|fs/xfs/pagebuf/page_buf.c|20020911181210|29475|cad79a273705caa2 nathans@sgi.com|fs/xfs/linux/xfs_buf.c|20040421223023|13511 torvalds@athlon.transmeta.com|arch/ia64/ia32/ia32_entry.S|20020205174031|45197|ba759906d266bbc0 jakub@redhat.com[davidm]|arch/ia64/ia32/ia32_entry.S|20040421214654|40178 torvalds@athlon.transmeta.com|arch/ia64/kernel/entry.S|20020205174031|52149|d716f26aff904d6a jakub@redhat.com[davidm]|arch/ia64/kernel/entry.S|20040421214654|21847 davidm@tiger.hpl.hp.com|arch/ia64/kernel/fsys.S|20030115061417|23325|be8b7081bb221fcf jakub@redhat.com[davidm]|arch/ia64/kernel/fsys.S|20040421214654|58642 @@ -391,7 +395,6 @@ hch@dhcp212.munich.sgi.com|fs/xfs/xfs_fsops.c|20020911181239|53779|7ec86aa44f6524cd akpm@osdl.org[torvalds]|fs/xfs/xfs_fsops.c|20040421144259|14553 hch@dhcp212.munich.sgi.com|fs/xfs/xfs_fsops.h|20020911181239|20512|dd8d50f269968a7f akpm@osdl.org[torvalds]|fs/xfs/xfs_fsops.h|20040421144259|26685 hch@dhcp212.munich.sgi.com|fs/xfs/xfs_log.c|20020911181244|09838|4f46e60be7d3b81b akpm@osdl.org[torvalds]|fs/xfs/xfs_log.c|20040421144259|09778 -hch@dhcp212.munich.sgi.com|fs/xfs/xfs_mount.c|20020911181247|03185|bb5c9880c3044af akpm@osdl.org[torvalds]|fs/xfs/xfs_mount.c|20040421144259|52698 hch@dhcp212.munich.sgi.com|fs/xfs/xfs_mount.h|20020911181248|04506|df8f9b66b921d105 akpm@osdl.org[torvalds]|fs/xfs/xfs_mount.h|20040421144259|63532 hch@dhcp212.munich.sgi.com|fs/xfs/xfs_trans.c|20020911181251|29402|369785934be1a52f akpm@osdl.org[torvalds]|fs/xfs/xfs_trans.c|20040421144259|06078 nathans@sgi.com|fs/xfs/linux/xfs_vfs.c|20030325213932|19671|23428aa91f5f2f57 akpm@osdl.org[torvalds]|fs/xfs/linux/xfs_vfs.c|20040421144259|40059 @@ -410,14 +413,11 @@ greg@kroah.com|security/root_plug.c|20021204225639|37298|97b47ec460d3693f akpm@osdl.org[torvalds]|security/root_plug.c|20040421144148|05996 torvalds@athlon.transmeta.com|fs/nfs/nfsroot.c|20020205173938|09849|a27eecbc660f9b58 akpm@osdl.org[torvalds]|fs/nfs/nfsroot.c|20040421144134|53965 hch@dhcp212.munich.sgi.com|fs/xfs/linux/xfs_globals.c|20020911181204|43692|eb5ee6f736a789a8 nathans@sgi.com|fs/xfs/linux/xfs_globals.c|20040421075659|58878 -hch@dhcp212.munich.sgi.com|fs/xfs/pagebuf/page_buf.h|20020911181210|62023|a708960bf9d686dc nathans@sgi.com|fs/xfs/linux/xfs_buf.h|20040421075659|59711 hch@dhcp212.munich.sgi.com|fs/xfs/linux/xfs_aops.c|20020911181202|07227|baab6de939af8c41 nathans@sgi.com|fs/xfs/linux/xfs_aops.c|20040421075659|18863 -hch@dhcp212.munich.sgi.com|fs/xfs/linux/xfs_linux.h|20020911181206|04059|7b5ea161a7eaa95a nathans@sgi.com|fs/xfs/linux/xfs_linux.h|20040421061358|02774 hch@dhcp212.munich.sgi.com|fs/xfs/xfs_vnodeops.c|20020911181256|62846|cf2d6abea6784bb9 nathans@sgi.com|fs/xfs/xfs_vnodeops.c|20040421061358|43137 hch@dhcp212.munich.sgi.com|fs/xfs/xfs_dir2_node.c|20020911181232|26563|e5d2a2a5c9db1858 cattelan@sgi.com|fs/xfs/xfs_dir2_node.c|20040421060816|02991 lord@sgi.com|fs/xfs/linux/xfs_iomap.c|20021106201658|64077|7a7e03287a655155 jpk@sgi.com|fs/xfs/xfs_iomap.c|20040421044803|44994 hch@dhcp212.munich.sgi.com|fs/xfs/xfs_acl.c|20020911181218|11441|5355affe396fe6fa nathans@sgi.com|fs/xfs/xfs_acl.c|20040421043330|65102 -hch@dhcp212.munich.sgi.com|fs/xfs/linux/xfs_super.h|20020911181207|33243|94f8917ed1d6e129 hch@sgi.com|fs/xfs/linux/xfs_super.h|20040421023548|24694 hch@dhcp212.munich.sgi.com|fs/xfs/linux/xfs_lrw.h|20020911181206|03842|4ec5e7c978ed9b91 hch@sgi.com|fs/xfs/linux/xfs_lrw.h|20040421023548|59097 torvalds@athlon.transmeta.com|include/asm-sparc64/siginfo.h|20020205173950|00234|1752112f221f71cf jakub@redhat.com|include/asm-sparc64/siginfo.h|20040420180600|32185 stevef@smfhome1.austin.rr.com|fs/cifs/inode.c|20021010191612|14894|215c466932f89364 stevef@stevef95.austin.ibm.com|fs/cifs/inode.c|20040420173136|39471 ===== fs/xfs/linux-2.6/xfs_linux.h 1.33 vs 1.34 ===== --- 1.33/fs/xfs/linux/xfs_linux.h 2004-04-21 08:13:58 +02:00 +++ 1.34/fs/xfs/linux/xfs_linux.h 2004-04-28 06:45:14 +02:00 @@ -72,6 +72,7 @@ #include #include +#include #include #include #include ===== fs/xfs/linux-2.6/xfs_buf.c 1.110 vs 1.111 ===== --- 1.110/fs/xfs/linux/xfs_buf.c 2004-04-22 00:30:23 +02:00 +++ 1.111/fs/xfs/linux/xfs_buf.c 2004-04-28 06:45:14 +02:00 @@ -47,7 +47,6 @@ #include #include #include -#include #include #include #include @@ -1472,6 +1471,64 @@ } } +/* + * Handling of buftargs. + */ + +void +xfs_free_buftarg( + xfs_buftarg_t *btp, + int external) +{ + xfs_flush_buftarg(btp, 1); + if (external) + xfs_blkdev_put(btp->pbr_bdev); + kmem_free(btp, sizeof(*btp)); +} + +void +xfs_incore_relse( + xfs_buftarg_t *btp, + int delwri_only, + int wait) +{ + invalidate_bdev(btp->pbr_bdev, 1); + truncate_inode_pages(btp->pbr_mapping, 0LL); +} + +void +xfs_setsize_buftarg( + xfs_buftarg_t *btp, + unsigned int blocksize, + unsigned int sectorsize) +{ + btp->pbr_bsize = blocksize; + btp->pbr_sshift = ffs(sectorsize) - 1; + btp->pbr_smask = sectorsize - 1; + + if (set_blocksize(btp->pbr_bdev, sectorsize)) { + printk(KERN_WARNING + "XFS: Cannot set_blocksize to %u on device %s\n", + sectorsize, XFS_BUFTARG_NAME(btp)); + } +} + +xfs_buftarg_t * +xfs_alloc_buftarg( + struct block_device *bdev) +{ + xfs_buftarg_t *btp; + + btp = kmem_zalloc(sizeof(*btp), KM_SLEEP); + + btp->pbr_dev = bdev->bd_dev; + btp->pbr_bdev = bdev; + btp->pbr_mapping = bdev->bd_inode->i_mapping; + xfs_setsize_buftarg(btp, PAGE_CACHE_SIZE, bdev_hardsect_size(bdev)); + + return btp; +} + /* * Pagebuf delayed write buffer handling @@ -1598,11 +1655,15 @@ complete_and_exit(&pagebuf_daemon_done, 0); } -void -pagebuf_delwri_flush( +/* + * Go through all incore buffers, and release buffers if they belong to + * the given device. This is used in filesystem error handling to + * preserve the consistency of its metadata. + */ +int +xfs_flush_buftarg( xfs_buftarg_t *target, - int wait, - int *pinptr) + int wait) { struct list_head tmp; xfs_buf_t *pb, *n; @@ -1658,8 +1719,7 @@ if (wait) blk_run_address_space(target->pbr_mapping); - if (pinptr) - *pinptr = pincount; + return pincount; } STATIC int ===== fs/xfs/xfs_vfsops.c 1.61 vs 1.62 ===== --- 1.61/fs/xfs/xfs_vfsops.c 2004-04-22 00:47:35 +02:00 +++ 1.62/fs/xfs/xfs_vfsops.c 2004-04-28 06:45:14 +02:00 @@ -625,7 +625,7 @@ if (*flags & MS_RDONLY) { xfs_refcache_purge_mp(mp); - pagebuf_delwri_flush(mp->m_ddev_targp, 0, NULL); + xfs_flush_buftarg(mp->m_ddev_targp, 0); xfs_finish_reclaim_all(mp, 0); /* This loop must run at least twice. @@ -637,8 +637,11 @@ */ do { VFS_SYNC(vfsp, REMOUNT_READONLY_FLAGS, NULL, error); - pagebuf_delwri_flush(mp->m_ddev_targp, 1, &pincount); - if(0 == pincount) { delay(50); count++; } + pincount = xfs_flush_buftarg(mp->m_ddev_targp, 1); + if (!pincount) { + delay(50); + count++; + } } while (count < 2); /* Ok now write out an unmount record */ ===== fs/xfs/linux-2.6/xfs_super.h 1.28 vs 1.29 ===== --- 1.28/fs/xfs/linux/xfs_super.h 2004-04-21 04:35:48 +02:00 +++ 1.29/fs/xfs/linux/xfs_super.h 2004-04-28 06:45:14 +02:00 @@ -126,12 +126,4 @@ struct block_device **); extern void xfs_blkdev_put(struct block_device *); -extern struct xfs_buftarg *xfs_alloc_buftarg(struct block_device *); -extern void xfs_relse_buftarg(struct xfs_buftarg *); -extern void xfs_free_buftarg(struct xfs_buftarg *); -extern void xfs_flush_buftarg(struct xfs_buftarg *); -extern int xfs_readonly_buftarg(struct xfs_buftarg *); -extern void xfs_setsize_buftarg(struct xfs_buftarg *, unsigned int, unsigned int); -extern unsigned int xfs_getsize_buftarg(struct xfs_buftarg *); - #endif /* __XFS_SUPER_H__ */ ===== fs/xfs/xfs_mount.c 1.43 vs 1.44 ===== --- 1.43/fs/xfs/xfs_mount.c 2004-04-21 11:13:46 +02:00 +++ 1.44/fs/xfs/xfs_mount.c 2004-04-28 06:45:14 +02:00 @@ -1126,22 +1126,11 @@ void xfs_unmountfs_close(xfs_mount_t *mp, struct cred *cr) { - int have_logdev = (mp->m_logdev_targp != mp->m_ddev_targp); - - if (mp->m_ddev_targp) { - xfs_free_buftarg(mp->m_ddev_targp); - mp->m_ddev_targp = NULL; - } - if (mp->m_rtdev_targp) { - xfs_blkdev_put(mp->m_rtdev_targp->pbr_bdev); - xfs_free_buftarg(mp->m_rtdev_targp); - mp->m_rtdev_targp = NULL; - } - if (mp->m_logdev_targp && have_logdev) { - xfs_blkdev_put(mp->m_logdev_targp->pbr_bdev); - xfs_free_buftarg(mp->m_logdev_targp); - mp->m_logdev_targp = NULL; - } + if (mp->m_logdev_targp != mp->m_ddev_targp) + xfs_free_buftarg(mp->m_logdev_targp, 1); + if (mp->m_rtdev_targp) + xfs_free_buftarg(mp->m_rtdev_targp, 1); + xfs_free_buftarg(mp->m_ddev_targp, 0); } int ===== fs/xfs/linux-2.6/xfs_buf.h 1.54 vs 1.55 ===== --- 1.54/fs/xfs/linux/xfs_buf.h 2004-04-21 09:56:59 +02:00 +++ 1.55/fs/xfs/linux/xfs_buf.h 2004-04-28 06:45:14 +02:00 @@ -296,7 +296,6 @@ /* Delayed Write Buffer Routines */ -extern void pagebuf_delwri_flush(xfs_buftarg_t *, int, int *); extern void pagebuf_delwri_dequeue(xfs_buf_t *); /* Buffer Daemon Setup Routines */ @@ -565,21 +564,6 @@ #define xfs_iowait(pb) pagebuf_iowait(pb) - -/* - * Go through all incore buffers, and release buffers - * if they belong to the given device. This is used in - * filesystem error handling to preserve the consistency - * of its metadata. - */ - -#define xfs_binval(buftarg) xfs_flush_buftarg(buftarg) - -#define XFS_bflush(buftarg) xfs_flush_buftarg(buftarg) - -#define xfs_incore_relse(buftarg,delwri_only,wait) \ - xfs_relse_buftarg(buftarg) - #define xfs_baread(target, rablkno, ralen) \ pagebuf_readahead((target), (rablkno), (ralen), PBF_DONT_BLOCK) @@ -587,5 +571,24 @@ #define xfs_buf_get_noaddr(len, target) pagebuf_get_no_daddr((len), (target)) #define xfs_buf_free(bp) pagebuf_free(bp) -#endif /* __XFS_BUF_H__ */ +/* + * Handling of buftargs. + */ + +extern xfs_buftarg_t *xfs_alloc_buftarg(struct block_device *); +extern void xfs_free_buftarg(xfs_buftarg_t *, int); +extern void xfs_setsize_buftarg(xfs_buftarg_t *, unsigned int, unsigned int); +extern void xfs_incore_relse(xfs_buftarg_t *, int, int); +extern int xfs_flush_buftarg(xfs_buftarg_t *, int); + +#define xfs_getsize_buftarg(buftarg) \ + block_size((buftarg)->pbr_bdev) +#define xfs_readonly_buftarg(buftarg) \ + bdev_read_only((buftarg)->pbr_bdev) +#define xfs_binval(buftarg) \ + xfs_flush_buftarg(buftarg, 1) +#define XFS_bflush(buftarg) \ + xfs_flush_buftarg(buftarg, 1) + +#endif /* __XFS_BUF_H__ */ ===== fs/xfs/linux-2.6/xfs_super.c 1.74 vs 1.75 ===== --- 1.74/fs/xfs/linux/xfs_super.c 2004-04-22 00:47:35 +02:00 +++ 1.75/fs/xfs/linux/xfs_super.c 2004-04-28 06:45:14 +02:00 @@ -67,7 +67,6 @@ #include "xfs_utils.h" #include "xfs_version.h" -#include #include #include #include @@ -282,75 +281,6 @@ close_bdev_excl(bdev); } -void -xfs_flush_buftarg( - xfs_buftarg_t *btp) -{ - pagebuf_delwri_flush(btp, 1, NULL); -} - -void -xfs_free_buftarg( - xfs_buftarg_t *btp) -{ - xfs_flush_buftarg(btp); - kmem_free(btp, sizeof(*btp)); -} - -int -xfs_readonly_buftarg( - xfs_buftarg_t *btp) -{ - return bdev_read_only(btp->pbr_bdev); -} - -void -xfs_relse_buftarg( - xfs_buftarg_t *btp) -{ - invalidate_bdev(btp->pbr_bdev, 1); - truncate_inode_pages(btp->pbr_mapping, 0LL); -} - -unsigned int -xfs_getsize_buftarg( - xfs_buftarg_t *btp) -{ - return block_size(btp->pbr_bdev); -} - -void -xfs_setsize_buftarg( - xfs_buftarg_t *btp, - unsigned int blocksize, - unsigned int sectorsize) -{ - btp->pbr_bsize = blocksize; - btp->pbr_sshift = ffs(sectorsize) - 1; - btp->pbr_smask = sectorsize - 1; - - if (set_blocksize(btp->pbr_bdev, sectorsize)) { - printk(KERN_WARNING - "XFS: Cannot set_blocksize to %u on device %s\n", - sectorsize, XFS_BUFTARG_NAME(btp)); - } -} - -xfs_buftarg_t * -xfs_alloc_buftarg( - struct block_device *bdev) -{ - xfs_buftarg_t *btp; - - btp = kmem_zalloc(sizeof(*btp), KM_SLEEP); - - btp->pbr_dev = bdev->bd_dev; - btp->pbr_bdev = bdev; - btp->pbr_mapping = bdev->bd_inode->i_mapping; - xfs_setsize_buftarg(btp, PAGE_CACHE_SIZE, bdev_hardsect_size(bdev)); - - return btp; -} STATIC struct inode * linvfs_alloc_inode(