rpms/kernel/F-9 linux-2.6.27-delay-ext4-free-block-cap-check.patch, NONE, 1.1
Chuck Ebbert
cebbert at fedoraproject.org
Thu Oct 30 04:43:14 UTC 2008
- Previous message: rpms/kernel/F-9 linux-2.6-firewire-git-pending.patch, 1.31, 1.32 linux-2.6-x86-tracehook.patch, NONE, 1.1 linux-2.6.27-ext-dir-corruption-fix.patch, NONE, 1.1 linux-2.6.27-ext4-stable-patch-queue.patch, NONE, 1.1 linux-2.6.27-fs-disable-fiemap.patch, NONE, 1.1 linux-2.6.27-hwmon-applesmc-2.6.28.patch, NONE, 1.1 linux-2.6.27-lirc.patch, NONE, 1.1 linux-2.6.27.tar.bz2.sign, NONE, 1.1 patch-2.6.27.4.bz2.sign, NONE, 1.1 .cvsignore, 1.830, 1.831 Makefile, 1.70, 1.71 Makefile.config, 1.63, 1.64 config-debug, 1.12, 1.13 config-generic, 1.119, 1.120 config-i686, 1.2, 1.3 config-ia64-generic, 1.11, 1.12 config-nodebug, 1.14, 1.15 config-powerpc-generic, 1.18, 1.19 config-powerpc32-generic, 1.10, 1.11 config-powerpc64, 1.15, 1.16 config-rhel-generic, 1.11, 1.12 config-s390x, 1.5, 1.6 config-sparc64-generic, 1.17, 1.18 config-sparc64-smp, 1.1, 1.2 config-x86-generic, 1.36, 1.37 config-x86_64-generic, 1.35, 1.36 kernel.spec, 1.813, 1.814 linux-2.6-build-nonintconfig.patch, 1.13, 1.14 linux-2.6-debug-nmi-timeout.patch, 1.3, 1.4 linux-2.6-execshield.patch, 1.89, 1.90 linux-2.6-firewire-git-update.patch, 1.15, 1.16 linux-2.6-netdev-atl2.patch, 1.2, 1.3 linux-2.6-silence-noise.patch, 1.16, 1.17 linux-2.6-squashfs.patch, 1.29, 1.30 linux-2.6-upstream-reverts.patch, 1.12, 1.13 linux-2.6-usb-ehci-hcd-respect-nousb.patch, 1.1, 1.2 linux-2.6-utrace.patch, 1.80, 1.81 sources, 1.791, 1.792 upstream, 1.710, 1.711 config-ia64, 1.2, NONE config-rhel-x86-generic, 1.2, NONE config-sparc, 1.2, NONE config-sparc-generic, 1.2, NONE config-sparc-smp, 1.1, NONE config-sparc64, 1.1, NONE config-xen-generic, 1.3, NONE config-xen-ia64, 1.1, NONE config-xen-x86, 1.1, NONE config-xen-x86_64, 1.1, NONE linux-2.6-cpuidle-1-do-not-use-poll_idle-unless-user-asks-for-it.patch, 1.1, NONE linux-2.6-cpuidle-2-menu-governor-fix-wrong-usage-of-measured_us.patch, 1.1, NONE linux-2.6-cpuidle-3-make-ladder-governor-honor-latency-requirements.patch, 1.1, NONE linux-2.6-drm-i915-fix-ioctl-security.patch, 1.1, NONE linux-2.6-e1000e-write-protect-nvm.patch, 1.1, NONE linux-2.6-fbdev-teach-offb-about-palette-on-radeon-r500-r600.patch, 1.1, NONE linux-2.6-fs-cifs-fix-plaintext-authentication.patch, 1.1, NONE linux-2.6-fs-cifs-turn-off-unicode-during-session-establishment.patch, 1.1, NONE linux-2.6-hwmon-applesmc-remove-debugging-messages.patch, 1.1, NONE linux-2.6-input-fix_fn_key_on_macbookpro_4_1_and_mb_air.patch, 1.2, NONE linux-2.6-intel-msr-backport.patch, 1.1, NONE linux-2.6-kernel-doc-structs-private.patch, 1.1, NONE linux-2.6-libata-fix-a-large-collection-of-DMA-mode-mismatches.patch, 1.1, NONE linux-2.6-libata-pata_it821x-driver-updates-and-reworking.patch, 1.1, NONE linux-2.6-libata-pata_marvell-play-nice-with-ahci.patch, 1.2, NONE linux-2.6-libata-sff-kill-spurious-WARN_ON-in-ata_hsm_move.patch, 1.1, NONE linux-2.6-lirc.patch, 1.10, NONE linux-2.6-net-print-module-name-as-part-of-the-message.patch, 1.1, NONE linux-2.6-netdev-atl1e.patch, 1.2, NONE linux-2.6-netdev-e1000e-fix-drv-load-issues-amt.patch, 1.1, NONE linux-2.6-powerpc-fix-OF-parsing-of-64-bits-pci-addresses.patch, 1.1, NONE linux-2.6-powerpc-zImage-32MiB.patch, 1.1, NONE linux-2.6-ppc-use-libgcc.patch, 1.5, NONE linux-2.6-ptrace-cleanup.patch, 1.1, NONE linux-2.6-rt2500usb-fix.patch, 1.1, NONE linux-2.6-sched-clock-fix-nohz-interaction.patch, 1.1, NONE linux-2.6-tracehook.patch, 1.2, NONE linux-2.6-wan-missing-capability-checks-in-sbni_ioctl.patch, 1.1, NONE linux-2.6-warn-Turn-the-netdev-timeout-WARN_ON-into-WARN.patch, 1.1, NONE linux-2.6-warn-add-WARN-macro.patch, 1.1, NONE linux-2.6-warn-rename-WARN-to-WARNING.patch, 1.1, NONE linux-2.6-wireless-p54-fix-regression-due-to-delete-NETDEVICES_MULTIQUEUE-option.patch, 1.1, NONE linux-2.6-wireless-pending.patch, 1.61, NONE linux-2.6-wireless-revert-b43-add-RFKILL_STATE_HARD_BLOCKED-support.patch, 1.1, NONE linux-2.6-wireless-rt2500pci-restoring-missing-line.patch, 1.1, NONE linux-2.6-wireless-stable-backports.patch, 1.1, NONE linux-2.6-wireless.patch, 1.47, NONE linux-2.6-x86-apic-dump-all-regs-v3.patch, 1.3, NONE linux-2.6-x86-hpet-04-workaround-sb700-bios.patch, 1.1, NONE linux-2.6-x86-pci-detect-end_bus_number.patch, 1.1, NONE linux-2.6-x86-sb450-skip-irq0-override-if-not-routed-to-INT2.patch, 1.2, NONE linux-2.6.26-ext-dir-corruption-fix.patch, 1.1, NONE linux-2.6.26.tar.bz2.sign, 1.1, NONE linux-sparc-tracehook-syscall.patch, 1.1, NONE patch-2.6.26.7.bz2.sign, 1.1, NONE
- Next message: rpms/python-Levenshtein/devel genextdoc.py, NONE, 1.1 import.log, NONE, 1.1 python-Levenshtein.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: cebbert
Update of /cvs/pkgs/rpms/kernel/F-9
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv16589
Added Files:
linux-2.6.27-delay-ext4-free-block-cap-check.patch
Log Message:
add missing patch
linux-2.6.27-delay-ext4-free-block-cap-check.patch:
--- NEW FILE linux-2.6.27-delay-ext4-free-block-cap-check.patch ---
diff -u linux-2.6/fs/ext4/balloc.c linux-2.6/fs/ext4/balloc.c
--- linux-2.6/fs/ext4/balloc.c 2008-10-24 15:54:54.225063944 -0500
+++ linux-2.6/fs/ext4/balloc.c 2008-10-24 15:38:52.897001441 -0500
@@ -589,21 +589,23 @@
return;
}
-int ext4_claim_free_blocks(struct ext4_sb_info *sbi,
- s64 nblocks)
+/**
+ * ext4_has_free_blocks()
+ * @sbi: in-core super block structure.
+ * @nblocks: number of needed blocks
+ *
+ * Check if filesystem has nblocks free & available for allocation.
+ * On success return 1, return 0 on failure.
+ */
+int ext4_has_free_blocks(struct ext4_sb_info *sbi, s64 nblocks)
{
- s64 free_blocks, dirty_blocks;
- s64 root_blocks = 0;
+ s64 free_blocks, dirty_blocks, root_blocks;
struct percpu_counter *fbc = &sbi->s_freeblocks_counter;
struct percpu_counter *dbc = &sbi->s_dirtyblocks_counter;
free_blocks = percpu_counter_read_positive(fbc);
dirty_blocks = percpu_counter_read_positive(dbc);
-
- if (!capable(CAP_SYS_RESOURCE) &&
- sbi->s_resuid != current->fsuid &&
- (sbi->s_resgid == 0 || !in_group_p(sbi->s_resgid)))
- root_blocks = ext4_r_blocks_count(sbi->s_es);
+ root_blocks = ext4_r_blocks_count(sbi->s_es);
if (free_blocks - (nblocks + root_blocks + dirty_blocks) <
EXT4_FREEBLOCKS_WATERMARK) {
@@ -616,57 +618,32 @@
}
}
/* Check whether we have space after
- * accounting for current dirty blocks
+ * accounting for current dirty blocks & root reserved blocks.
*/
- if (free_blocks < ((root_blocks + nblocks) + dirty_blocks))
- /* we don't have free space */
- return -ENOSPC;
+ if (free_blocks >= ((root_blocks + nblocks) + dirty_blocks))
+ return 1;
+
+ /* Hm, nope. Are (enough) root reserved blocks available? */
+ if (sbi->s_resuid == current->fsuid ||
+ ((sbi->s_resgid != 0) && in_group_p(sbi->s_resgid)) ||
+ capable(CAP_SYS_RESOURCE)) {
+ if (free_blocks >= (nblocks + dirty_blocks))
+ return 1;
+ }
- /* Add the blocks to nblocks */
- percpu_counter_add(dbc, nblocks);
return 0;
}
-/**
- * ext4_has_free_blocks()
- * @sbi: in-core super block structure.
- * @nblocks: number of neeed blocks
- *
- * Check if filesystem has free blocks available for allocation.
- * Return the number of blocks avaible for allocation for this request
- * On success, return nblocks
- */
-ext4_fsblk_t ext4_has_free_blocks(struct ext4_sb_info *sbi,
+int ext4_claim_free_blocks(struct ext4_sb_info *sbi,
s64 nblocks)
{
- s64 free_blocks, dirty_blocks;
- s64 root_blocks = 0;
- struct percpu_counter *fbc = &sbi->s_freeblocks_counter;
- struct percpu_counter *dbc = &sbi->s_dirtyblocks_counter;
-
- free_blocks = percpu_counter_read_positive(fbc);
- dirty_blocks = percpu_counter_read_positive(dbc);
-
- if (!capable(CAP_SYS_RESOURCE) &&
- sbi->s_resuid != current->fsuid &&
- (sbi->s_resgid == 0 || !in_group_p(sbi->s_resgid)))
- root_blocks = ext4_r_blocks_count(sbi->s_es);
-
- if (free_blocks - (nblocks + root_blocks + dirty_blocks) <
- EXT4_FREEBLOCKS_WATERMARK) {
- free_blocks = percpu_counter_sum(fbc);
- dirty_blocks = percpu_counter_sum(dbc);
- }
- if (free_blocks <= (root_blocks + dirty_blocks))
- /* we don't have free space */
+ if (ext4_has_free_blocks(sbi, nblocks)) {
+ percpu_counter_add(&sbi->s_dirtyblocks_counter, nblocks);
return 0;
-
- if (free_blocks - (root_blocks + dirty_blocks) < nblocks)
- return free_blocks - (root_blocks + dirty_blocks);
- return nblocks;
+ } else
+ return -ENOSPC;
}
-
/**
* ext4_should_retry_alloc()
* @sb: super block
unchanged:
--- linux-2.6.orig/fs/ext4/ext4.h 2008-10-24 15:32:33.302001208 -0500
+++ linux-2.6/fs/ext4/ext4.h 2008-10-24 15:32:36.077063920 -0500
@@ -1003,8 +1003,7 @@ extern ext4_fsblk_t ext4_new_blocks(hand
ext4_lblk_t iblock, ext4_fsblk_t goal,
unsigned long *count, int *errp);
extern int ext4_claim_free_blocks(struct ext4_sb_info *sbi, s64 nblocks);
-extern ext4_fsblk_t ext4_has_free_blocks(struct ext4_sb_info *sbi,
- s64 nblocks);
+extern int ext4_has_free_blocks(struct ext4_sb_info *sbi, s64 nblocks);
extern void ext4_free_blocks(handle_t *handle, struct inode *inode,
ext4_fsblk_t block, unsigned long count, int metadata);
extern void ext4_free_blocks_sb(handle_t *handle, struct super_block *sb,
- Previous message: rpms/kernel/F-9 linux-2.6-firewire-git-pending.patch, 1.31, 1.32 linux-2.6-x86-tracehook.patch, NONE, 1.1 linux-2.6.27-ext-dir-corruption-fix.patch, NONE, 1.1 linux-2.6.27-ext4-stable-patch-queue.patch, NONE, 1.1 linux-2.6.27-fs-disable-fiemap.patch, NONE, 1.1 linux-2.6.27-hwmon-applesmc-2.6.28.patch, NONE, 1.1 linux-2.6.27-lirc.patch, NONE, 1.1 linux-2.6.27.tar.bz2.sign, NONE, 1.1 patch-2.6.27.4.bz2.sign, NONE, 1.1 .cvsignore, 1.830, 1.831 Makefile, 1.70, 1.71 Makefile.config, 1.63, 1.64 config-debug, 1.12, 1.13 config-generic, 1.119, 1.120 config-i686, 1.2, 1.3 config-ia64-generic, 1.11, 1.12 config-nodebug, 1.14, 1.15 config-powerpc-generic, 1.18, 1.19 config-powerpc32-generic, 1.10, 1.11 config-powerpc64, 1.15, 1.16 config-rhel-generic, 1.11, 1.12 config-s390x, 1.5, 1.6 config-sparc64-generic, 1.17, 1.18 config-sparc64-smp, 1.1, 1.2 config-x86-generic, 1.36, 1.37 config-x86_64-generic, 1.35, 1.36 kernel.spec, 1.813, 1.814 linux-2.6-build-nonintconfig.patch, 1.13, 1.14 linux-2.6-debug-nmi-timeout.patch, 1.3, 1.4 linux-2.6-execshield.patch, 1.89, 1.90 linux-2.6-firewire-git-update.patch, 1.15, 1.16 linux-2.6-netdev-atl2.patch, 1.2, 1.3 linux-2.6-silence-noise.patch, 1.16, 1.17 linux-2.6-squashfs.patch, 1.29, 1.30 linux-2.6-upstream-reverts.patch, 1.12, 1.13 linux-2.6-usb-ehci-hcd-respect-nousb.patch, 1.1, 1.2 linux-2.6-utrace.patch, 1.80, 1.81 sources, 1.791, 1.792 upstream, 1.710, 1.711 config-ia64, 1.2, NONE config-rhel-x86-generic, 1.2, NONE config-sparc, 1.2, NONE config-sparc-generic, 1.2, NONE config-sparc-smp, 1.1, NONE config-sparc64, 1.1, NONE config-xen-generic, 1.3, NONE config-xen-ia64, 1.1, NONE config-xen-x86, 1.1, NONE config-xen-x86_64, 1.1, NONE linux-2.6-cpuidle-1-do-not-use-poll_idle-unless-user-asks-for-it.patch, 1.1, NONE linux-2.6-cpuidle-2-menu-governor-fix-wrong-usage-of-measured_us.patch, 1.1, NONE linux-2.6-cpuidle-3-make-ladder-governor-honor-latency-requirements.patch, 1.1, NONE linux-2.6-drm-i915-fix-ioctl-security.patch, 1.1, NONE linux-2.6-e1000e-write-protect-nvm.patch, 1.1, NONE linux-2.6-fbdev-teach-offb-about-palette-on-radeon-r500-r600.patch, 1.1, NONE linux-2.6-fs-cifs-fix-plaintext-authentication.patch, 1.1, NONE linux-2.6-fs-cifs-turn-off-unicode-during-session-establishment.patch, 1.1, NONE linux-2.6-hwmon-applesmc-remove-debugging-messages.patch, 1.1, NONE linux-2.6-input-fix_fn_key_on_macbookpro_4_1_and_mb_air.patch, 1.2, NONE linux-2.6-intel-msr-backport.patch, 1.1, NONE linux-2.6-kernel-doc-structs-private.patch, 1.1, NONE linux-2.6-libata-fix-a-large-collection-of-DMA-mode-mismatches.patch, 1.1, NONE linux-2.6-libata-pata_it821x-driver-updates-and-reworking.patch, 1.1, NONE linux-2.6-libata-pata_marvell-play-nice-with-ahci.patch, 1.2, NONE linux-2.6-libata-sff-kill-spurious-WARN_ON-in-ata_hsm_move.patch, 1.1, NONE linux-2.6-lirc.patch, 1.10, NONE linux-2.6-net-print-module-name-as-part-of-the-message.patch, 1.1, NONE linux-2.6-netdev-atl1e.patch, 1.2, NONE linux-2.6-netdev-e1000e-fix-drv-load-issues-amt.patch, 1.1, NONE linux-2.6-powerpc-fix-OF-parsing-of-64-bits-pci-addresses.patch, 1.1, NONE linux-2.6-powerpc-zImage-32MiB.patch, 1.1, NONE linux-2.6-ppc-use-libgcc.patch, 1.5, NONE linux-2.6-ptrace-cleanup.patch, 1.1, NONE linux-2.6-rt2500usb-fix.patch, 1.1, NONE linux-2.6-sched-clock-fix-nohz-interaction.patch, 1.1, NONE linux-2.6-tracehook.patch, 1.2, NONE linux-2.6-wan-missing-capability-checks-in-sbni_ioctl.patch, 1.1, NONE linux-2.6-warn-Turn-the-netdev-timeout-WARN_ON-into-WARN.patch, 1.1, NONE linux-2.6-warn-add-WARN-macro.patch, 1.1, NONE linux-2.6-warn-rename-WARN-to-WARNING.patch, 1.1, NONE linux-2.6-wireless-p54-fix-regression-due-to-delete-NETDEVICES_MULTIQUEUE-option.patch, 1.1, NONE linux-2.6-wireless-pending.patch, 1.61, NONE linux-2.6-wireless-revert-b43-add-RFKILL_STATE_HARD_BLOCKED-support.patch, 1.1, NONE linux-2.6-wireless-rt2500pci-restoring-missing-line.patch, 1.1, NONE linux-2.6-wireless-stable-backports.patch, 1.1, NONE linux-2.6-wireless.patch, 1.47, NONE linux-2.6-x86-apic-dump-all-regs-v3.patch, 1.3, NONE linux-2.6-x86-hpet-04-workaround-sb700-bios.patch, 1.1, NONE linux-2.6-x86-pci-detect-end_bus_number.patch, 1.1, NONE linux-2.6-x86-sb450-skip-irq0-override-if-not-routed-to-INT2.patch, 1.2, NONE linux-2.6.26-ext-dir-corruption-fix.patch, 1.1, NONE linux-2.6.26.tar.bz2.sign, 1.1, NONE linux-sparc-tracehook-syscall.patch, 1.1, NONE patch-2.6.26.7.bz2.sign, 1.1, NONE
- Next message: rpms/python-Levenshtein/devel genextdoc.py, NONE, 1.1 import.log, NONE, 1.1 python-Levenshtein.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list