Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 18702
b: refs/heads/master
c: d669af9
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Jan 17, 2006
1 parent 8f6315c commit 52902bb
Show file tree
Hide file tree
Showing 171 changed files with 7,502 additions and 6,130 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f87d09be8c2c270b83c2ad80d06206a7306e2fa9
refs/heads/master: d669af9d5afb5bdb629f78d024b35e507465f570
63 changes: 63 additions & 0 deletions trunk/Documentation/filesystems/fuse.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,62 @@ Mount options
The default is infinite. Note that the size of read requests is
limited anyway to 32 pages (which is 128kbyte on i386).

Sysfs
~~~~~

FUSE sets up the following hierarchy in sysfs:

/sys/fs/fuse/connections/N/

where N is an increasing number allocated to each new connection.

For each connection the following attributes are defined:

'waiting'

The number of requests which are waiting to be transfered to
userspace or being processed by the filesystem daemon. If there is
no filesystem activity and 'waiting' is non-zero, then the
filesystem is hung or deadlocked.

'abort'

Writing anything into this file will abort the filesystem
connection. This means that all waiting requests will be aborted an
error returned for all aborted and new requests.

Only a privileged user may read or write these attributes.

Aborting a filesystem connection
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

It is possible to get into certain situations where the filesystem is
not responding. Reasons for this may be:

a) Broken userspace filesystem implementation

b) Network connection down

c) Accidental deadlock

d) Malicious deadlock

(For more on c) and d) see later sections)

In either of these cases it may be useful to abort the connection to
the filesystem. There are several ways to do this:

- Kill the filesystem daemon. Works in case of a) and b)

- Kill the filesystem daemon and all users of the filesystem. Works
in all cases except some malicious deadlocks

- Use forced umount (umount -f). Works in all cases but only if
filesystem is still attached (it hasn't been lazy unmounted)

- Abort filesystem through the sysfs interface. Most powerful
method, always works.

How do non-privileged mounts work?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down Expand Up @@ -313,3 +369,10 @@ faulted with get_user_pages(). The 'req->locked' flag indicates
when the copy is taking place, and interruption is delayed until
this flag is unset.

Scenario 3 - Tricky deadlock with asynchronous read
---------------------------------------------------

The same situation as above, except thread-1 will wait on page lock
and hence it will be uninterruptible as well. The solution is to
abort the connection with forced umount (if mount is attached) or
through the abort attribute in sysfs.
35 changes: 22 additions & 13 deletions trunk/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -106,12 +106,13 @@ KBUILD_OUTPUT := $(shell cd $(KBUILD_OUTPUT) && /bin/pwd)
$(if $(KBUILD_OUTPUT),, \
$(error output directory "$(saved-output)" does not exist))

.PHONY: $(MAKECMDGOALS)
.PHONY: $(MAKECMDGOALS) cdbuilddir
$(MAKECMDGOALS) _all: cdbuilddir

$(filter-out _all,$(MAKECMDGOALS)) _all:
cdbuilddir:
$(if $(KBUILD_VERBOSE:1=),@)$(MAKE) -C $(KBUILD_OUTPUT) \
KBUILD_SRC=$(CURDIR) \
KBUILD_EXTMOD="$(KBUILD_EXTMOD)" -f $(CURDIR)/Makefile $@
KBUILD_EXTMOD="$(KBUILD_EXTMOD)" -f $(CURDIR)/Makefile $(MAKECMDGOALS)

# Leave processing to above invocation of make
skip-makefile := 1
Expand Down Expand Up @@ -262,6 +263,13 @@ export quiet Q KBUILD_VERBOSE
# cc support functions to be used (only) in arch/$(ARCH)/Makefile
# See documentation in Documentation/kbuild/makefiles.txt

# as-option
# Usage: cflags-y += $(call as-option, -Wa$(comma)-isa=foo,)

as-option = $(shell if $(CC) $(CFLAGS) $(1) -Wa,-Z -c -o /dev/null \
-xassembler /dev/null > /dev/null 2>&1; then echo "$(1)"; \
else echo "$(2)"; fi ;)

# cc-option
# Usage: cflags-y += $(call cc-option, -march=winchip-c6, -march=i586)

Expand Down Expand Up @@ -337,8 +345,9 @@ AFLAGS := -D__ASSEMBLY__

# Read KERNELRELEASE from .kernelrelease (if it exists)
KERNELRELEASE = $(shell cat .kernelrelease 2> /dev/null)
KERNELVERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)

export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE \
export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION \
ARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC \
CPP AR NM STRIP OBJCOPY OBJDUMP MAKE AWK GENKSYMS PERL UTS_MACHINE \
HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS
Expand Down Expand Up @@ -433,6 +442,7 @@ export KBUILD_DEFCONFIG
config %config: scripts_basic outputmakefile FORCE
$(Q)mkdir -p include/linux
$(Q)$(MAKE) $(build)=scripts/kconfig $@
$(Q)$(MAKE) .kernelrelease

else
# ===========================================================================
Expand Down Expand Up @@ -542,7 +552,7 @@ export INSTALL_PATH ?= /boot
# makefile but the arguement can be passed to make if needed.
#

MODLIB := $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE)
MODLIB = $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE)
export MODLIB


Expand Down Expand Up @@ -783,12 +793,10 @@ endif
localver-full = $(localver)$(localver-auto)

# Store (new) KERNELRELASE string in .kernelrelease
kernelrelease = \
$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)$(localver-full)
kernelrelease = $(KERNELVERSION)$(localver-full)
.kernelrelease: FORCE
$(Q)rm -f .kernelrelease
$(Q)echo $(kernelrelease) > .kernelrelease
$(Q)echo " Building kernel $(kernelrelease)"
$(Q)rm -f $@
$(Q)echo $(kernelrelease) > $@


# Things we need to do before we recursively start building the kernel
Expand Down Expand Up @@ -898,7 +906,7 @@ define filechk_version.h
)
endef

include/linux/version.h: $(srctree)/Makefile FORCE
include/linux/version.h: $(srctree)/Makefile .config FORCE
$(call filechk,version.h)

# ---------------------------------------------------------------------------
Expand Down Expand Up @@ -1301,9 +1309,10 @@ checkstack:
$(PERL) $(src)/scripts/checkstack.pl $(ARCH)

kernelrelease:
@echo $(KERNELRELEASE)
$(if $(wildcard .kernelrelease), $(Q)echo $(KERNELRELEASE), \
$(error kernelrelease not valid - run 'make *config' to update it))
kernelversion:
@echo $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
@echo $(KERNELVERSION)

# FIXME Should go into a make.lib or something
# ===========================================================================
Expand Down
3 changes: 2 additions & 1 deletion trunk/arch/arm26/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ int show_interrupts(struct seq_file *p, void *v)
if (i < NR_IRQS) {
action = irq_desc[i].action;
if (!action)
continue;
goto out;
seq_printf(p, "%3d: %10u ", i, kstat_irqs(i));
seq_printf(p, " %s", action->name);
for (action = action->next; action; action = action->next) {
Expand All @@ -152,6 +152,7 @@ int show_interrupts(struct seq_file *p, void *v)
show_fiq_list(p, v);
seq_printf(p, "Err: %10lu\n", irq_err_count);
}
out:
return 0;
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm26/kernel/ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,7 @@ static int ptrace_getfpregs(struct task_struct *tsk, void *ufp)
static int ptrace_setfpregs(struct task_struct *tsk, void *ufp)
{
set_stopped_child_used_math(tsk);
return copy_from_user(&task_threas_info(tsk)->fpstate, ufp,
return copy_from_user(&task_thread_info(tsk)->fpstate, ufp,
sizeof(struct user_fp)) ? -EFAULT : 0;
}

Expand Down
5 changes: 1 addition & 4 deletions trunk/arch/i386/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,7 @@ CFLAGS += $(call cc-option,-mpreferred-stack-boundary=2)
# CPU-specific tuning. Anything which can be shared with UML should go here.
include $(srctree)/arch/i386/Makefile.cpu

# -mregparm=3 works ok on gcc-3.0 and later
#
cflags-$(CONFIG_REGPARM) += $(shell if [ $(call cc-version) -ge 0300 ] ; then \
echo "-mregparm=3"; fi ;)
cflags-$(CONFIG_REGPARM) += -mregparm=3

# Disable unit-at-a-time mode on pre-gcc-4.0 compilers, it makes gcc use
# a lot more stack due to the lack of sharing of stacklots:
Expand Down
4 changes: 2 additions & 2 deletions trunk/arch/i386/kernel/cpu/cpufreq/powernow-k8.c
Original file line number Diff line number Diff line change
Expand Up @@ -980,7 +980,7 @@ static int powernowk8_verify(struct cpufreq_policy *pol)
}

/* per CPU init entry point to the driver */
static int __init powernowk8_cpu_init(struct cpufreq_policy *pol)
static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol)
{
struct powernow_k8_data *data;
cpumask_t oldmask = CPU_MASK_ALL;
Expand Down Expand Up @@ -1141,7 +1141,7 @@ static struct cpufreq_driver cpufreq_amd64_driver = {
};

/* driver entry point for init */
static int __init powernowk8_init(void)
static int __cpuinit powernowk8_init(void)
{
unsigned int i, supported_cpus = 0;

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/i386/mm/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ static void __init permanent_kmaps_init(pgd_t *pgd_base)
pkmap_page_table = pte;
}

static void __devinit free_new_highpage(struct page *page)
static void __meminit free_new_highpage(struct page *page)
{
set_page_count(page, 1);
__free_page(page);
Expand Down
2 changes: 2 additions & 0 deletions trunk/arch/ia64/kernel/perfmon.c
Original file line number Diff line number Diff line change
Expand Up @@ -628,9 +628,11 @@ static int pfm_write_ibr_dbr(int mode, pfm_context_t *ctx, void *arg, int count,

#include "perfmon_itanium.h"
#include "perfmon_mckinley.h"
#include "perfmon_montecito.h"
#include "perfmon_generic.h"

static pmu_config_t *pmu_confs[]={
&pmu_conf_mont,
&pmu_conf_mck,
&pmu_conf_ita,
&pmu_conf_gen, /* must be last */
Expand Down
Loading

0 comments on commit 52902bb

Please sign in to comment.