The NetBSD Project

CVS log for src/lib/librefuse/refuse.c

[BACK] Up to [cvs.NetBSD.org] / src / lib / librefuse

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.114: download - view: text, markup, annotated - select for diffs
Sat Jan 22 08:09:39 2022 UTC (2 years, 10 months ago) by pho
Branches: MAIN
CVS tags: perseant-exfatfs-base-20240630, perseant-exfatfs-base, perseant-exfatfs, netbsd-10-base, netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10, HEAD
Diff to: previous 1.113: preferred, colored
Changes since revision 1.113: +165 -273 lines
lib/librefuse: Implement all sorts of compat tweaks to appease various file systems

ReFUSE now supports all the FUSE API variants from FUSE 1.1 to FUSE
3.10. Sorry for the freaking giant patch. I could not break it down
any further.

Revision 1.113: download - view: text, markup, annotated - select for diffs
Sat Jan 22 08:07:02 2022 UTC (2 years, 10 months ago) by pho
Branches: MAIN
Diff to: previous 1.112: preferred, colored
Changes since revision 1.112: +16 -2 lines
Zero-clear the fuse_context in fuse_destroy(3)

Revision 1.112: download - view: text, markup, annotated - select for diffs
Sat Jan 22 08:05:35 2022 UTC (2 years, 10 months ago) by pho
Branches: MAIN
Diff to: previous 1.111: preferred, colored
Changes since revision 1.111: +13 -7 lines
Support the FUSE option -ho

It is supposed to print a help message without the usage
line. Although it is deprecated and has been removed as of FUSE 3.0,
filesystems in the wild still use it.

Revision 1.111: download - view: text, markup, annotated - select for diffs
Sat Jan 22 08:03:32 2022 UTC (2 years, 10 months ago) by pho
Branches: MAIN
Diff to: previous 1.110: preferred, colored
Changes since revision 1.110: +51 -2 lines
Implement some missing functions that are part of the API

Revision 1.110: download - view: text, markup, annotated - select for diffs
Sat Jan 22 08:02:49 2022 UTC (2 years, 10 months ago) by pho
Branches: MAIN
Diff to: previous 1.109: preferred, colored
Changes since revision 1.109: +18 -4 lines
Correct the wrong prototype of fuse_daemonize(3) while retaining ABI compatibility

Revision 1.109: download - view: text, markup, annotated - select for diffs
Sat Jan 22 08:01:12 2022 UTC (2 years, 10 months ago) by pho
Branches: MAIN
Diff to: previous 1.108: preferred, colored
Changes since revision 1.108: +3 -8 lines
Change the way how FUSE_*_VERSION are handled

* FUSE_MAKE_VERSION(maj, min) now generates a 3-digits number if the
  version is higher than 3.9. This is needed to support FUSE 3.10 API.

* FUSE_{MAJOR,MINOR}_VERSION no longer have a fixed value but are
  derived from FUSE_USE_VERSION specified by the user code. This is
  needed to support more FUSE filesystems in the wild.

Revision 1.108: download - view: text, markup, annotated - select for diffs
Sat Jan 22 08:00:17 2022 UTC (2 years, 10 months ago) by pho
Branches: MAIN
Diff to: previous 1.107: preferred, colored
Changes since revision 1.107: +16 -2 lines
Implement a dummy pathconf() which always returns EINVAL

Revision 1.107: download - view: text, markup, annotated - select for diffs
Sat Jan 22 07:59:33 2022 UTC (2 years, 10 months ago) by pho
Branches: MAIN
Diff to: previous 1.106: preferred, colored
Changes since revision 1.106: +7 -7 lines
Do not call fuse_operations.getattr() before initializing filesystem

Revision 1.106: download - view: text, markup, annotated - select for diffs
Sat Jan 22 07:58:32 2022 UTC (2 years, 10 months ago) by pho
Branches: MAIN
Diff to: previous 1.105: preferred, colored
Changes since revision 1.105: +12 -12 lines
Increase the warning level to spot more mistakes

Revision 1.105: download - view: text, markup, annotated - select for diffs
Sat Jan 22 07:57:30 2022 UTC (2 years, 10 months ago) by pho
Branches: MAIN
Diff to: previous 1.104: preferred, colored
Changes since revision 1.104: +19 -2 lines
lib/librefuse: Add support for legacy types and functions

Revision 1.104: download - view: text, markup, annotated - select for diffs
Sat Jan 22 07:53:06 2022 UTC (2 years, 10 months ago) by pho
Branches: MAIN
Diff to: previous 1.103: preferred, colored
Changes since revision 1.103: +4 -2 lines
lib/librefuse: Implement FUSE session API and its signal handling functionality

Revision 1.103: download - view: text, markup, annotated - select for diffs
Sat Dec 4 06:42:39 2021 UTC (3 years ago) by pho
Branches: MAIN
Diff to: previous 1.102: preferred, colored
Changes since revision 1.102: +8 -4 lines
librefuse: Preparation of a proper API versioning; no more #ifdef woes in user code

The goal is to fully support FUSE API version 3.0 while maintaining
API/ABI compatibility with code written for 2.6 (or even older).

* <fuse.h> now emits a compiler warning if it's included without
  defining FUSE_USE_VERSION. It had been silently defaulted to the
  latest supported version prior to this change. This is permissive
  compared to the original FUSE, as it emits an error instead.

* <fuse.h> now emits a warning if FUSE_USE_VERSION is higher than what
  can be provided.

* Added a macro FUSE_MAKE_VERSION(maj, min). It was missing from
  librefuse <fuse.h>.

No actual API updates have been made (yet).

Revision 1.102: download - view: text, markup, annotated - select for diffs
Tue Nov 30 12:13:12 2021 UTC (3 years ago) by pho
Branches: MAIN
Diff to: previous 1.101: preferred, colored
Changes since revision 1.101: +14 -5 lines
Move the call of fuse_operations::init() from fuse_new() to fuse_loop()

Prior to this change we were calling init() before daemonizing the
process. Some filesystems call chdir(2) in init() but fuse_daemonize()
call chdir("/"), which breaks assumptions about the state of the
process.

Revision 1.98.14.2: download - view: text, markup, annotated - select for diffs
Mon Apr 13 08:03:15 2020 UTC (4 years, 7 months ago) by martin
Branches: phil-wifi
Diff to: previous 1.98.14.1: preferred, colored; branchpoint 1.98: preferred, colored; next MAIN 1.99: preferred, colored
Changes since revision 1.98.14.1: +8 -6 lines
Mostly merge changes from HEAD upto 20200411

Revision 1.101: download - view: text, markup, annotated - select for diffs
Mon Sep 23 12:00:57 2019 UTC (5 years, 2 months ago) by christos
Branches: MAIN
CVS tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, is-mlppp-base, is-mlppp, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Diff to: previous 1.100: preferred, colored
Changes since revision 1.100: +8 -6 lines
Restore binary compatibility by using the statvfs90 structure internally.

Revision 1.98.14.1: download - view: text, markup, annotated - select for diffs
Mon Jun 10 22:05:26 2019 UTC (5 years, 6 months ago) by christos
Branches: phil-wifi
Diff to: previous 1.98: preferred, colored
Changes since revision 1.98: +8 -2 lines
Sync with HEAD

Revision 1.100: download - view: text, markup, annotated - select for diffs
Wed Apr 10 21:42:52 2019 UTC (5 years, 8 months ago) by maya
Branches: MAIN
CVS tags: phil-wifi-20190609, netbsd-9-base, netbsd-9-4-RELEASE, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9
Diff to: previous 1.99: preferred, colored
Changes since revision 1.99: +3 -3 lines
Use the equivalent FUSE_VERSION. Probably a more adequately named macro for this

Revision 1.99: download - view: text, markup, annotated - select for diffs
Wed Apr 10 21:38:02 2019 UTC (5 years, 8 months ago) by maya
Branches: MAIN
Diff to: previous 1.98: preferred, colored
Changes since revision 1.98: +8 -2 lines
provide fuse_version

Revision 1.96.12.1: download - view: text, markup, annotated - select for diffs
Sat Jan 7 08:56:04 2017 UTC (7 years, 11 months ago) by pgoyette
Branches: pgoyette-localcount
Diff to: previous 1.96: preferred, colored; next MAIN 1.97: preferred, colored
Changes since revision 1.96: +168 -238 lines
Sync with HEAD.  (Note that most of these changes are simply $NetBSD$
tag issues.)

Revision 1.98: download - view: text, markup, annotated - select for diffs
Sun Nov 20 13:28:32 2016 UTC (8 years ago) by pho
Branches: MAIN
CVS tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, phil-wifi-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-compat-merge-20190127, pgoyette-compat-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315, pgoyette-compat, perseant-stdc-iso10646-base, perseant-stdc-iso10646, netbsd-8-base, netbsd-8-3-RELEASE, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-8, matt-nb8-mediatek-base, matt-nb8-mediatek, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan
Branch point for: phil-wifi
Diff to: previous 1.97: preferred, colored
Changes since revision 1.97: +149 -232 lines
fuse_main(3): Support general fuse options via fuse_parse_cmdline(3)

* Prototypes for fuse_new(3), fuse_mount(3), and fuse_unmount(3) now
  matches to the original fuse interface.

* Add fuse_daemonize(3): needs to have a different prototype,
  otherwise we can't use puffs_daemon(3).

* Remove fuse_setup(3) and fuse_teardown(3). These obsolete functions
  has already been removed from the original interface.

* fuse_main(3) now supports the following command-line options
  compatible with the original fuse:

  -h, --help      print help message
  -V, --version   print library version (currently does nothing)
  -d, -o debug    enable debug output (PUFFS_FLAG_OPDUMP), implies -f
  -f              foreground mode
  -s              single threaded mode (always enabled for now)
  -o fsname=NAME  explicitly set the name of the file system

* fuse_main(3) now daemonizes the process by default. This is for the
  compatibility with the original fuse.

Revision 1.97: download - view: text, markup, annotated - select for diffs
Thu Nov 17 14:20:25 2016 UTC (8 years ago) by pho
Branches: MAIN
Diff to: previous 1.96: preferred, colored
Changes since revision 1.96: +21 -8 lines
Change the way how puffs_fuse_node_create() behaves.

In puffs "create" and "open" are two separate operations with
atomicity achieved by locking the parent vnode. In fuse, on the other
hand, "create" is actually a create-and-open-atomically and the open
flags (O_RDWR, O_APPEND, ...) are passed via fi.flags. So the only way
to emulate the fuse semantics is to open the file with dummy flags and
then immediately close it.

You might think that we could simply use fuse->op.mknod all the time
but no, that's not possible because most file systems nowadays expect
op.mknod to be called only for non-regular files and many don't even
support it.

Revision 1.95.6.1: download - view: text, markup, annotated - select for diffs
Mon Feb 25 00:28:00 2013 UTC (11 years, 9 months ago) by tls
Branches: tls-maxphys
Diff to: previous 1.95: preferred, colored; next MAIN 1.96: preferred, colored
Changes since revision 1.95: +7 -5 lines
resync with head

Revision 1.94.2.2: download - view: text, markup, annotated - select for diffs
Wed Jan 23 00:05:26 2013 UTC (11 years, 10 months ago) by yamt
Branches: yamt-pagecache
CVS tags: yamt-pagecache-tag8
Diff to: previous 1.94.2.1: preferred, colored; branchpoint 1.94: preferred, colored; next MAIN 1.95: preferred, colored
Changes since revision 1.94.2.1: +7 -5 lines
sync with head

Revision 1.89.4.3: download - view: text, markup, annotated - select for diffs
Sun Jan 13 17:57:48 2013 UTC (11 years, 10 months ago) by bouyer
Branches: netbsd-5
Diff to: previous 1.89.4.2: preferred, colored; branchpoint 1.89: preferred, colored; next MAIN 1.90: preferred, colored
Changes since revision 1.89.4.2: +8 -6 lines
Pull up following revision(s) (requested by tron in ticket #1836):
	lib/librefuse/refuse.c: revision 1.96 via patch
FUSE seems to allow short writes without errors but PUFFS doesn't. Work
around this by returning ENOSPC in case of a short write to avoid protocol
errors. This change is based on problem analysis provided by Antti Kantee.
This fixes PR lib/45129 by myself.

Revision 1.95.2.1: download - view: text, markup, annotated - select for diffs
Mon Jan 7 15:54:00 2013 UTC (11 years, 11 months ago) by riz
Branches: netbsd-6
CVS tags: netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1
Diff to: previous 1.95: preferred, colored; next MAIN 1.96: preferred, colored
Changes since revision 1.95: +7 -5 lines
Pull up following revision(s) (requested by tron in ticket #772):
	lib/librefuse/refuse.c: revision 1.96
FUSE seems to allow short writes without errors but PUFFS doesn't. Work
around this by returning ENOSPC in case of a short write to avoid protocol
errors. This change is based on problem analysis provided by Antti Kantee.
This fixes PR lib/45129 by myself.

Revision 1.96: download - view: text, markup, annotated - select for diffs
Sun Dec 30 10:04:22 2012 UTC (11 years, 11 months ago) by tron
Branches: MAIN
CVS tags: yamt-pagecache-base9, yamt-pagecache-base8, tls-maxphys-base, tls-earlyentropy-base, tls-earlyentropy, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, pgoyette-localcount-base, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7, localcount-20160914, agc-symver-base, agc-symver
Branch point for: pgoyette-localcount
Diff to: previous 1.95: preferred, colored
Changes since revision 1.95: +7 -5 lines
FUSE seems to allow short writes without errors but PUFFS doesn't. Work
around this by returning ENOSPC in case of a short write to avoid protocol
errors. This change is based on problem analysis provided by Antti Kantee.

This fixes PR lib/45129 by myself.

Revision 1.94.2.1: download - view: text, markup, annotated - select for diffs
Tue Apr 17 00:05:32 2012 UTC (12 years, 7 months ago) by yamt
Branches: yamt-pagecache
Diff to: previous 1.94: preferred, colored
Changes since revision 1.94: +5 -2 lines
sync with head

Revision 1.95: download - view: text, markup, annotated - select for diffs
Thu Nov 24 01:56:22 2011 UTC (13 years ago) by manu
Branches: MAIN
CVS tags: yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, netbsd-6-base, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus
Branch point for: tls-maxphys, netbsd-6
Diff to: previous 1.94: preferred, colored
Changes since revision 1.94: +5 -2 lines
Set eofflag in puffs_fuse_node_readdir() from librefuse.

From Evgeniy Ivanov <lolkaantimat@gmail.com>

Revision 1.89.4.2: download - view: text, markup, annotated - select for diffs
Mon Aug 8 19:56:50 2011 UTC (13 years, 4 months ago) by riz
Branches: netbsd-5
CVS tags: netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2
Diff to: previous 1.89.4.1: preferred, colored; branchpoint 1.89: preferred, colored
Changes since revision 1.89.4.1: +5 -5 lines
Pull up following revision(s) (requested by tron in ticket #1650):
	lib/librefuse/refuse.c: revision 1.94
Call the FUSE init operation before we try to access the file-system.
This prevents a crash in "fuse_ext2" which I previously worked around
with a patch.

Revision 1.89.4.1: download - view: text, markup, annotated - select for diffs
Mon Aug 8 19:53:29 2011 UTC (13 years, 4 months ago) by riz
Branches: netbsd-5
Diff to: previous 1.89: preferred, colored
Changes since revision 1.89: +4 -4 lines
Pull up following revision(s) (requested by tron in ticket #1648):
	lib/librefuse/refuse.c: revision 1.93
Don't ignore "userdata" argument in "fuse_main_real". This can crash
a FUSE file-system that passes a non-NULL argument here.

Revision 1.94: download - view: text, markup, annotated - select for diffs
Sat Jul 9 17:16:46 2011 UTC (13 years, 5 months ago) by tron
Branches: MAIN
CVS tags: yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base
Branch point for: yamt-pagecache
Diff to: previous 1.93: preferred, colored
Changes since revision 1.93: +5 -5 lines
Call the FUSE init operation before we try to access the file-system.
This prevents a crash in "fuse_ext2" which I previously worked around
with a patch.

Revision 1.93: download - view: text, markup, annotated - select for diffs
Sat Jul 9 14:50:00 2011 UTC (13 years, 5 months ago) by tron
Branches: MAIN
Diff to: previous 1.92: preferred, colored
Changes since revision 1.92: +4 -4 lines
Don't ignore "userdata" argument in "fuse_main_real". This can crash
a FUSE file-system that passes a non-NULL argument here.

Revision 1.91.2.1: download - view: text, markup, annotated - select for diffs
Wed May 13 19:18:35 2009 UTC (15 years, 7 months ago) by jym
Branches: jym-xensuspend
Diff to: previous 1.91: preferred, colored; next MAIN 1.92: preferred, colored
Changes since revision 1.91: +3 -3 lines
Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html

Revision 1.92: download - view: text, markup, annotated - select for diffs
Thu Mar 5 01:21:57 2009 UTC (15 years, 9 months ago) by msaitoh
Branches: MAIN
CVS tags: matt-premerge-20091211, matt-mips64-premerge-20101231, jym-xensuspend-nbase, jym-xensuspend-base, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Diff to: previous 1.91: preferred, colored
Changes since revision 1.91: +3 -3 lines
fix typo (s/stucture/structure/)

Revision 1.91: download - view: text, markup, annotated - select for diffs
Mon Jan 26 04:00:40 2009 UTC (15 years, 10 months ago) by lukem
Branches: MAIN
Branch point for: jym-xensuspend
Diff to: previous 1.90: preferred, colored
Changes since revision 1.90: +3 -3 lines
sign-compare fix

Revision 1.90: download - view: text, markup, annotated - select for diffs
Mon Jan 19 10:01:38 2009 UTC (15 years, 10 months ago) by lukem
Branches: MAIN
Diff to: previous 1.89: preferred, colored
Changes since revision 1.89: +3 -3 lines
fix -Wsign-compare issue

Revision 1.88.6.1: download - view: text, markup, annotated - select for diffs
Thu Sep 18 04:39:24 2008 UTC (16 years, 2 months ago) by wrstuden
Branches: wrstuden-revivesa
Diff to: previous 1.88: preferred, colored; next MAIN 1.89: preferred, colored
Changes since revision 1.88: +27 -6 lines
Sync with wrstuden-revivesa-base-2.

Revision 1.89: download - view: text, markup, annotated - select for diffs
Fri Aug 1 15:54:09 2008 UTC (16 years, 4 months ago) by dillo
Branches: MAIN
CVS tags: wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, netbsd-5-base, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-base2
Branch point for: netbsd-5
Diff to: previous 1.88: preferred, colored
Changes since revision 1.88: +27 -6 lines
Add API version 2.6 variant of fuse_setup.

Reviewed by agc.

Revision 1.75.2.3: download - view: text, markup, annotated - select for diffs
Sun Mar 23 00:40:29 2008 UTC (16 years, 8 months ago) by matt
Branches: matt-armv6
Diff to: previous 1.75.2.2: preferred, colored; next MAIN 1.76: preferred, colored
Changes since revision 1.75.2.2: +3 -3 lines
sync with HEAD

Revision 1.88: download - view: text, markup, annotated - select for diffs
Mon Jan 14 16:07:00 2008 UTC (16 years, 10 months ago) by pooka
Branches: MAIN
CVS tags: yamt-pf42-baseX, yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-pf42-base, yamt-pf42, wrstuden-revivesa-base-1, wrstuden-revivesa-base, matt-armv6-nbase, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-nbase, hpcarm-cleanup-base
Branch point for: wrstuden-revivesa
Diff to: previous 1.87: preferred, colored
Changes since revision 1.87: +3 -3 lines
return -ret from statfs

Revision 1.75.2.2: download - view: text, markup, annotated - select for diffs
Wed Jan 9 01:36:54 2008 UTC (16 years, 11 months ago) by matt
Branches: matt-armv6
Diff to: previous 1.75.2.1: preferred, colored
Changes since revision 1.75.2.1: +35 -55 lines
sync with HEAD

Revision 1.87: download - view: text, markup, annotated - select for diffs
Thu Dec 27 11:39:06 2007 UTC (16 years, 11 months ago) by pooka
Branches: MAIN
CVS tags: matt-armv6-base
Diff to: previous 1.86: preferred, colored
Changes since revision 1.86: +2 -3 lines
Uncommit accidentally committed PUFFS_FLAG_OPDUMP.

overextensive library verbosity noticed by riz

Revision 1.86: download - view: text, markup, annotated - select for diffs
Wed Dec 12 16:37:56 2007 UTC (17 years ago) by xtraeme
Branches: MAIN
Diff to: previous 1.85: preferred, colored
Changes since revision 1.85: +3 -3 lines
puffs_fuse_node_create: if create() is specified set S_IFREG explicitly
to avoid passing unspecified mode. Fixes latest ntfs-3g... patch
from pooka tested by myself.

Revision 1.85: download - view: text, markup, annotated - select for diffs
Fri Nov 30 19:02:29 2007 UTC (17 years ago) by pooka
Branches: MAIN
CVS tags: cube-autoconf-base, cube-autoconf
Diff to: previous 1.84: preferred, colored
Changes since revision 1.84: +29 -45 lines
Rototill.

Ok, ok, a few more words about it: stop holding puffs_cc as a holy
value and passing it around to almost every possible place (popquiz:
which kernel variable does this remind you of?).  Instead, pass
the natural choice, puffs_usermount, and fetch puffs_cc via
puffs_cc_getcc() only in routines which actually need it.  This
not only simplifies code, but (thanks to the introduction of
puffs_cc_getcc()) enables constructs which weren't previously sanely
possible, say layering as a curious example.

There's still a little to do on this front, but this was the major
fs interface blast.

Revision 1.84: download - view: text, markup, annotated - select for diffs
Tue Nov 27 11:31:20 2007 UTC (17 years ago) by pooka
Branches: MAIN
Diff to: previous 1.83: preferred, colored
Changes since revision 1.83: +10 -14 lines
Remove "puffs_cid" from the puffs interface following l-removal
from the kernel vfs interfaces.  puffs_cc_getcaller(pcc) can be
used now should the same information be desired.

Revision 1.83: download - view: text, markup, annotated - select for diffs
Thu Nov 8 17:08:46 2007 UTC (17 years, 1 month ago) by pooka
Branches: MAIN
Diff to: previous 1.82: preferred, colored
Changes since revision 1.82: +3 -2 lines
I've written more than a fair share of this to see my name up in
lights.  Wine & women, come to me now!

Revision 1.75.2.1: download - view: text, markup, annotated - select for diffs
Tue Nov 6 23:11:57 2007 UTC (17 years, 1 month ago) by matt
Branches: matt-armv6
CVS tags: matt-armv6-prevmlocking
Diff to: previous 1.75: preferred, colored
Changes since revision 1.75: +35 -35 lines
sync with HEAD

Revision 1.82: download - view: text, markup, annotated - select for diffs
Mon Nov 5 17:48:18 2007 UTC (17 years, 1 month ago) by pooka
Branches: MAIN
Diff to: previous 1.81: preferred, colored
Changes since revision 1.81: +3 -3 lines
Pull the daemonizing code out of the library mainloop into the file
servers.  Calling daemon() (i.e. fork()ing) inside a library can
cause nice surprises for e.g. threaded programs.  As discussed with
Greg Oster & others.

Revision 1.81: download - view: text, markup, annotated - select for diffs
Mon Nov 5 13:41:52 2007 UTC (17 years, 1 month ago) by pooka
Branches: MAIN
Diff to: previous 1.80: preferred, colored
Changes since revision 1.80: +7 -4 lines
Header cleanup: don't need defs.h to do a few includes for us.  Also,
use #include <> for global headers instead of #include "".

Revision 1.80: download - view: text, markup, annotated - select for diffs
Mon Nov 5 13:38:27 2007 UTC (17 years, 1 month ago) by pooka
Branches: MAIN
Diff to: previous 1.79: preferred, colored
Changes since revision 1.79: +25 -12 lines
* Fix pthread key creation to depend on if it hasn't been created before
  instead of depending if a lock was succesfully acquired.  Also, add
  a comment explaining why it is such complex (for all I could guess).
* replace err()'s with abort()
* replace some abort()'s by returning failure

Revision 1.79: download - view: text, markup, annotated - select for diffs
Sun Oct 28 18:41:54 2007 UTC (17 years, 1 month ago) by pooka
Branches: MAIN
Diff to: previous 1.78: preferred, colored
Changes since revision 1.78: +4 -22 lines
Use puffs prepost ops for setting pid/lwpid instead of separate
calls in all methods.

Revision 1.78: download - view: text, markup, annotated - select for diffs
Tue Oct 23 17:19:19 2007 UTC (17 years, 1 month ago) by pooka
Branches: MAIN
Diff to: previous 1.77: preferred, colored
Changes since revision 1.77: +19 -1 lines
revert 1.77, MULTITHREADED_REFUSE has problems

Revision 1.77: download - view: text, markup, annotated - select for diffs
Sun Oct 21 16:46:52 2007 UTC (17 years, 1 month ago) by pooka
Branches: MAIN
Diff to: previous 1.76: preferred, colored
Changes since revision 1.76: +3 -21 lines
Get rid of MULTITHREADED_REFUSE for context queries.  We can simply
use the pthread codepaths always.

Revision 1.76: download - view: text, markup, annotated - select for diffs
Sun Oct 21 14:36:35 2007 UTC (17 years, 1 month ago) by pooka
Branches: MAIN
Diff to: previous 1.75: preferred, colored
Changes since revision 1.75: +24 -22 lines
Use new puffs features to provide correct caller info instead of
sometimes returning stale data.

Revision 1.75: download - view: text, markup, annotated - select for diffs
Sat Aug 25 12:03:59 2007 UTC (17 years, 3 months ago) by pooka
Branches: MAIN
Branch point for: matt-armv6
Diff to: previous 1.74: preferred, colored
Changes since revision 1.74: +3 -3 lines
Now that we don't dump operations by default, might as well detach
from the console by default also.  (but still would be nice if someone
provided options to toggle these using the fuse options framework)

Revision 1.74: download - view: text, markup, annotated - select for diffs
Sun Aug 12 15:32:39 2007 UTC (17 years, 4 months ago) by pooka
Branches: MAIN
Diff to: previous 1.73: preferred, colored
Changes since revision 1.73: +5 -2 lines
In case a file system doesn't provide st_blksize, default to DEV_BSIZE.

Revision 1.73.4.2: download - view: text, markup, annotated - select for diffs
Wed Jul 18 22:05:42 2007 UTC (17 years, 4 months ago) by pooka
Branches: matt-mips64
Diff to: previous 1.73.4.1: preferred, colored; branchpoint 1.73: preferred, colored; next MAIN 1.74: preferred, colored
Changes since revision 1.73.4.1: +1436 -0 lines
Don't stay on the foreground and dump operations by default.

XXX: someone(tm) should make it possible to set PUFFS_OPFLAG_DUMP
using the fuse options framework

Revision 1.73.4.1
Wed Jul 18 22:05:41 2007 UTC (17 years, 4 months ago) by pooka
Branches: matt-mips64
FILE REMOVED
Changes since revision 1.73: +0 -1436 lines
file refuse.c was added on branch matt-mips64 on 2007-07-18 22:05:42 +0000

Revision 1.73: download - view: text, markup, annotated - select for diffs
Wed Jul 18 22:05:41 2007 UTC (17 years, 4 months ago) by pooka
Branches: MAIN
CVS tags: matt-mips64-base, hpcarm-cleanup
Branch point for: matt-mips64
Diff to: previous 1.72: preferred, colored
Changes since revision 1.72: +2 -3 lines
Don't stay on the foreground and dump operations by default.

XXX: someone(tm) should make it possible to set PUFFS_OPFLAG_DUMP
using the fuse options framework

Revision 1.72: download - view: text, markup, annotated - select for diffs
Tue Jul 17 11:34:53 2007 UTC (17 years, 4 months ago) by pooka
Branches: MAIN
Diff to: previous 1.71: preferred, colored
Changes since revision 1.71: +4 -3 lines
* add mntfromname parameter to puffs_init()
* set it in file servers

Revision 1.71: download - view: text, markup, annotated - select for diffs
Sun Jul 1 18:40:16 2007 UTC (17 years, 5 months ago) by pooka
Branches: MAIN
Diff to: previous 1.70: preferred, colored
Changes since revision 1.70: +30 -26 lines
adapt: **newnode etc. pointers -> struct puffs_newinfo

Revision 1.70: download - view: text, markup, annotated - select for diffs
Sun Jul 1 17:23:45 2007 UTC (17 years, 5 months ago) by pooka
Branches: MAIN
Diff to: previous 1.69: preferred, colored
Changes since revision 1.69: +32 -28 lines
adapt: pid -> const struct puffs_cid *

Revision 1.69: download - view: text, markup, annotated - select for diffs
Sun Jul 1 15:32:02 2007 UTC (17 years, 5 months ago) by pooka
Branches: MAIN
Diff to: previous 1.68: preferred, colored
Changes since revision 1.68: +11 -11 lines
adapt: pcn->pcn_cred is now a pointer

Revision 1.68: download - view: text, markup, annotated - select for diffs
Sun Jun 24 22:25:49 2007 UTC (17 years, 5 months ago) by pooka
Branches: MAIN
Diff to: previous 1.67: preferred, colored
Changes since revision 1.67: +3 -4 lines
Actually, keep PUFFS_KFLAG_NOCACHE and -o cache around as shorthand
to neither page- nor namecache.

Revision 1.67: download - view: text, markup, annotated - select for diffs
Sun Jun 24 22:18:38 2007 UTC (17 years, 5 months ago) by pooka
Branches: MAIN
Diff to: previous 1.66: preferred, colored
Changes since revision 1.66: +4 -3 lines
PUFFS_KFLAG_NOCACHE became two, so introduce the command line options
-o nonamecache and -o nopagecache and adapt file systems where necessary.

Revision 1.66: download - view: text, markup, annotated - select for diffs
Tue Jun 12 18:57:05 2007 UTC (17 years, 6 months ago) by agc
Branches: MAIN
Diff to: previous 1.65: preferred, colored
Changes since revision 1.65: +164 -75 lines
Use pthread_[gs]etspecific to store a pointer to the fuse_context
information, enabled if MULTITHREADED_REFUSE is defined at build
time. This is not enabled by default since libpuffs is not
threadsafe yet.

librefuse is still not threadsafe, but this gets rid of a whole lot of
problems in the meantime.

Revision 1.65: download - view: text, markup, annotated - select for diffs
Tue Jun 12 18:54:36 2007 UTC (17 years, 6 months ago) by agc
Branches: MAIN
Diff to: previous 1.64: preferred, colored
Changes since revision 1.64: +10 -10 lines
Minor cleanup - change uses of malloc, memset to calloc.

Use EXIT_FAILURE in preference to the less informational 1.

Revision 1.64: download - view: text, markup, annotated - select for diffs
Tue Jun 12 18:53:29 2007 UTC (17 years, 6 months ago) by agc
Branches: MAIN
Diff to: previous 1.63: preferred, colored
Changes since revision 1.63: +31 -29 lines
Re-work the way the SET_FUSE_CONTEXT* macros are done, following
feedback from Antti.

Revision 1.63: download - view: text, markup, annotated - select for diffs
Mon Jun 11 20:54:33 2007 UTC (17 years, 6 months ago) by agc
Branches: MAIN
Diff to: previous 1.62: preferred, colored
Changes since revision 1.62: +10 -6 lines
# use puffs_cred_getuid(3) and puffs_cred_getgid(3)

for i in `jot 100 1`; do
	echo "I must respect the abstractions which pooka put in puffs_cred(3)"
done

Revision 1.62: download - view: text, markup, annotated - select for diffs
Mon Jun 11 20:10:00 2007 UTC (17 years, 6 months ago) by agc
Branches: MAIN
Diff to: previous 1.61: preferred, colored
Changes since revision 1.61: +95 -34 lines
Set the uid, gid and pid wherever possible (i.e. where known). This gets
us far enough along that fuse-loggedfs now works with the correct command,
uid and gid being displayed.

Revision 1.61: download - view: text, markup, annotated - select for diffs
Thu May 24 00:55:57 2007 UTC (17 years, 6 months ago) by agc
Branches: MAIN
Diff to: previous 1.60: preferred, colored
Changes since revision 1.60: +5 -2 lines
After we've malloc'd an area of storage, zero out this storage, "just in
case".

Revision 1.60: download - view: text, markup, annotated - select for diffs
Thu May 17 21:28:12 2007 UTC (17 years, 6 months ago) by pooka
Branches: MAIN
Diff to: previous 1.59: preferred, colored
Changes since revision 1.59: +12 -4 lines
Calling puffs_exit() in fuse_{exit,unmount}() is wrong, as those
shouldn't release resources.  As a quick hack to prevent double
frees etc, introduce "dead" variable into fuse channel to signal
if the backing puffs resource was already freed.  XXX: the check
is only in exit/unmount currently.

Proper fix really depends on some puffs features I still haven't
gotten around to doing.

Revision 1.59: download - view: text, markup, annotated - select for diffs
Thu May 17 21:00:32 2007 UTC (17 years, 6 months ago) by pooka
Branches: MAIN
Diff to: previous 1.58: preferred, colored
Changes since revision 1.58: +3 -2 lines
create hash for the root path object

Revision 1.58: download - view: text, markup, annotated - select for diffs
Thu May 17 16:41:18 2007 UTC (17 years, 6 months ago) by pooka
Branches: MAIN
Diff to: previous 1.57: preferred, colored
Changes since revision 1.57: +3 -2 lines
initialize refusenode contents to 0

(don't change malloc to calloc and expect things not to break)

Revision 1.57: download - view: text, markup, annotated - select for diffs
Thu May 17 14:13:04 2007 UTC (17 years, 6 months ago) by pooka
Branches: MAIN
Diff to: previous 1.56: preferred, colored
Changes since revision 1.56: +6 -7 lines
reflect changes in fs mount: use puffs_mount() instead of
puffs_domount() & puffs_start()

Revision 1.56: download - view: text, markup, annotated - select for diffs
Thu May 17 01:55:43 2007 UTC (17 years, 6 months ago) by christos
Branches: MAIN
Diff to: previous 1.55: preferred, colored
Changes since revision 1.55: +6 -38 lines
More fixes:
- make sure that the args array is NULL terminated.
- make sure argc is initialized and argv is set to NULL after freeing.
- make the deep copy function an opt interface function.

Revision 1.55: download - view: text, markup, annotated - select for diffs
Wed May 16 21:39:08 2007 UTC (17 years, 6 months ago) by christos
Branches: MAIN
Diff to: previous 1.54: preferred, colored
Changes since revision 1.54: +38 -27 lines
- Always check strdup return. For now we are lazy and bail instead of cleaning
  up.
- Use malloc and free instead of macros, delete macros.
- Merge the two copies of deep copy and free args that were slightly buggy
  into one and use that one.

XXX: Lots of ints should be size_t.
XXX: Bailing on error is not a good thing for a library.
XXX: Defs.h should be eliminated completely. Not all files need all the headers.

Revision 1.54: download - view: text, markup, annotated - select for diffs
Wed May 16 10:53:41 2007 UTC (17 years, 6 months ago) by pooka
Branches: MAIN
Diff to: previous 1.53: preferred, colored
Changes since revision 1.53: +4 -2 lines
Enable puffs_fakecc.  FUSE file systems don't use continuations anyway,
and now file servers linked against libpthread won't crash when they
attempt to malloc something.

Revision 1.53: download - view: text, markup, annotated - select for diffs
Tue May 15 22:56:16 2007 UTC (17 years, 6 months ago) by agc
Branches: MAIN
Diff to: previous 1.52: preferred, colored
Changes since revision 1.52: +44 -16 lines
When parsing arguments for the directory to mount, search backwards from
the end of the argument vector for an argument that doesn't begin with '-',
and use it - this improves upon the previous naive approach of using the
last argument, which could have been placed there by one of the argument
appending functions.

Be consistent with the mount name processing, and always do the
puffs:refuse:filesystem substitution once and once only.

% priv mount.ntfs-3g ntfs-refuse.img /mnt
% df /mnt
Filesystem           1K-blocks      Used     Avail Capacity  Mounted on
puffs:refuse:ntfs-3g   1000943     66309    934634     6%    /mnt
% priv umount /mnt
% priv /usr/src/share/examples/refuse/id3fs/id3fs /mnt &
% df /mnt
Filesystem         1K-blocks      Used     Avail Capacity  Mounted on
puffs:refuse:id3fs         0         0         0   100%    /mnt
% priv umount /mnt
%

Revision 1.52: download - view: text, markup, annotated - select for diffs
Tue May 15 22:46:06 2007 UTC (17 years, 6 months ago) by agc
Branches: MAIN
Diff to: previous 1.51: preferred, colored
Changes since revision 1.51: +3 -3 lines
When puffs_mount fails, display the name of the directory which wasn't
able to be mounted.

Revision 1.51: download - view: text, markup, annotated - select for diffs
Thu May 3 21:02:54 2007 UTC (17 years, 7 months ago) by agc
Branches: MAIN
Diff to: previous 1.50: preferred, colored
Changes since revision 1.50: +110 -71 lines
Implement fuse_setup(), and fuse_teardown() - necessary for the python
bindings for refuse.

Revision 1.50: download - view: text, markup, annotated - select for diffs
Wed May 2 18:05:54 2007 UTC (17 years, 7 months ago) by pooka
Branches: MAIN
Diff to: previous 1.49: preferred, colored
Changes since revision 1.49: +10 -2 lines
In case a fuse fs hands an stbuf with an inode number 0 to the
readdir filler, fake the inode number.  Our readdir() doesn't show
entries with inode number 0.

per discussion with Stephen Borrill

Revision 1.49: download - view: text, markup, annotated - select for diffs
Tue May 1 15:58:25 2007 UTC (17 years, 7 months ago) by pooka
Branches: MAIN
Diff to: previous 1.48: preferred, colored
Changes since revision 1.48: +3 -2 lines
use PUFFS_FLAG_HASHPATH

Revision 1.48: download - view: text, markup, annotated - select for diffs
Mon Apr 16 09:55:51 2007 UTC (17 years, 7 months ago) by agc
Branches: MAIN
Diff to: previous 1.47: preferred, colored
Changes since revision 1.47: +47 -8 lines
Flesh out the args management a bit more:

+ put some meat into the add_arg and insert_arg functions
+ implement the free_args function
+ use 0 and 1 return values, instead of EXIT_SUCCESS and EXIT_FAILURE, in
  internal functions (they bear no relation to shell exit values)
+ deep copy argument structures in refuse.c - we need to do this because
  some FUSE file systems attempt to obliterate^Wcloak the argument vector
  "for security reasons"
+ a side benefit of this is that we get the specific refuse file system
  name back again:

[10:48:43] agc@inspiron1300 ...src/lib/librefuse 38 > df
Filesystem         1K-blocks      Used     Avail Capacity  Mounted on
/dev/dk0            28101396  19318530   7377798    72%    /
kernfs                     1         1         0   100%    /kern
procfs                     4         4         0   100%    /proc
ptyfs                      1         1         0   100%    /dev/pts
puffs:refuse:id3fs         0         0         0   100%    /mnt
[10:48:51] agc@inspiron1300 ...src/lib/librefuse 39 >

Revision 1.47: download - view: text, markup, annotated - select for diffs
Fri Apr 13 13:35:46 2007 UTC (17 years, 8 months ago) by pooka
Branches: MAIN
Diff to: previous 1.46: preferred, colored
Changes since revision 1.46: +3 -4 lines
Instead of keeping on adding parameters to puffs_mount(), make it
only take the bare essentials, which currently means removing
"maxreqlen" from the argument list (all current callers I'm aware
of set it as 0 anyway).  Introduce puffs_init(), which provides a
context for setting various parameters and puffs_domount(), which
can be used to mount the file system.  Keep puffs_mount() as a
shortcut for the above two for simple file systems.

Bump development ABI version to 13.  After all, it's Friday the 13th.
Watch out!  Bad things can happen on Friday the 13th. --No carrier--

Revision 1.46: download - view: text, markup, annotated - select for diffs
Thu Apr 12 15:09:01 2007 UTC (17 years, 8 months ago) by pooka
Branches: MAIN
Diff to: previous 1.45: preferred, colored
Changes since revision 1.45: +35 -34 lines
Hide struct puffs_usermount from the rest of the world and provide
accessors for interesting data in it.  Namely, you can now get
pu->pu_privdata with puffs_getspecific(), pu->pu_pn_root with
puffs_set/getroot() and pu->pu_maxreqlen with puffs_getmaxreqlen().

Revision 1.45: download - view: text, markup, annotated - select for diffs
Wed Apr 11 21:10:51 2007 UTC (17 years, 8 months ago) by pooka
Branches: MAIN
Diff to: previous 1.44: preferred, colored
Changes since revision 1.44: +5 -5 lines
adapt to new readdir signature.  no functional change

Revision 1.44: download - view: text, markup, annotated - select for diffs
Fri Mar 16 08:17:36 2007 UTC (17 years, 8 months ago) by pooka
Branches: MAIN
Diff to: previous 1.43: preferred, colored
Changes since revision 1.43: +4 -3 lines
use puffs_addvtype2mode() in puffs_fuse_node_mknod()

Revision 1.43: download - view: text, markup, annotated - select for diffs
Tue Mar 13 22:47:04 2007 UTC (17 years, 9 months ago) by agc
Branches: MAIN
Diff to: previous 1.42: preferred, colored
Changes since revision 1.42: +68 -142 lines
Revert the most recent changes I made - they weren't ready for primetime.

Revision 1.42: download - view: text, markup, annotated - select for diffs
Tue Mar 13 22:25:32 2007 UTC (17 years, 9 months ago) by agc
Branches: MAIN
Diff to: previous 1.41: preferred, colored
Changes since revision 1.41: +10 -6 lines
Fix a thinko - if  we're going to do a deep copy, let's do it properly.

With  thanks to xtraeme for the viirtual PR.

Revision 1.41: download - view: text, markup, annotated - select for diffs
Tue Mar 13 20:50:47 2007 UTC (17 years, 9 months ago) by agc
Branches: MAIN
Diff to: previous 1.40: preferred, colored
Changes since revision 1.40: +136 -66 lines
+ Only use EXIT_SUCCESS and EXIT_FAILURE for the return code to the
shell in the fuse_opt functions

+ add new debugging functions:
	+ __fuse_debug(), which is used to set and retrieve the
	debugging level, so that debugging information can be turned
	on and off from the user-level filesystem, and
	+ __fuse_pargs(), which prints out an argv vector

+ put the comment about pu_privdata back with the code it references

+ put the code to place the refuse name back into the fuse_new()
function - we have access to all the arguments there.

+ specifically include <fuse_opt.h> in <fuse.h> - this would seem to
be what FUSE itself does, judging by the number of fuse-based
filesystems I've patched to include <fuse_opt.h> specifically

+ do away with the forward reference to struct fuse_args in fuse.h,
since it is defined just after the forward reference without being
referenced in between

+ fill in the missing refuse_opt args functionality - add an arg to the
args structure in fuse_opt_add_arg() and fuse_opt_insert_arg(), and
free allocated memory in fuse_opt_free_args().

+ get rid of spurious forward declarations and prototypes.

+ if REFUSE_INHERIT_FS_CHARACTERISTICS is defined when refuse is built,
file systems inherit the vfs characteristics of their mountpoints. The
default value is NOT to inherit the vfs characteristics.

+ perform a deep copy of the fuse_args structure in fuse_mount() -
this is so that existing FUSE filesystems still DTRT when arguments
are zeroed out.

Revision 1.40: download - view: text, markup, annotated - select for diffs
Wed Feb 28 16:23:00 2007 UTC (17 years, 9 months ago) by xtraeme
Branches: MAIN
Diff to: previous 1.39: preferred, colored
Changes since revision 1.39: +2 -42 lines
* Move fuse_opt* defs and prototypes into fuse_opt.h.
* Move fuse_opt* funcs from refuse.c into refuse_opt.c.

Implement fuse_opt_parse() and fuse_opt_match(). And make the other
functions just dummy, always returning 0 (I added debugging printfs
to see what the application is trying to do).

For now there are two things that do not work in fuse_opt:

	* options accepting arguments, i.e -otimeout=%u or -ofile=%s.
	* options without arguments are not enabled, just parsed.

At least now curlftpfs works, even with verbose mode! :-)

Ok'ed by pooka.

Revision 1.39: download - view: text, markup, annotated - select for diffs
Mon Feb 26 22:28:11 2007 UTC (17 years, 9 months ago) by agc
Branches: MAIN
Diff to: previous 1.38: preferred, colored
Changes since revision 1.38: +3 -3 lines
For just now, just use "puffs:refuse" as the file system name - this will
be revisited when thee fuse_args parsing is revisited.

Revision 1.38: download - view: text, markup, annotated - select for diffs
Mon Feb 26 15:57:33 2007 UTC (17 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.37: preferred, colored
Changes since revision 1.37: +115 -52 lines
Refactor a few interfaces a bit to look more like fuse.  fuse_args
is implemented as a very dummy version (i.e. totally unimplemented),
so some effort is still needed there.

After this change it is possible to compile and run ntfs-3g.  It
works read/write for ntfs images and shows no faults at least with
superficial testing.  I did not test it against a block device,
only an image.

Thanks to Tracy and Jason for help with the test image.

Revision 1.37: download - view: text, markup, annotated - select for diffs
Mon Feb 26 15:09:19 2007 UTC (17 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.36: preferred, colored
Changes since revision 1.36: +5 -3 lines
convert FREAD/FWRITE to O_RDWR-stuff in open

Revision 1.36: download - view: text, markup, annotated - select for diffs
Mon Feb 26 13:52:16 2007 UTC (17 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.35: preferred, colored
Changes since revision 1.35: +83 -31 lines
Implement readdir properly, or at least as close to possible to how
fuse does it: read directory completely into refuse buffers if starting
from read offset 0 and for later calls trickle results from the buffers
to the kernel without consulting the fuse file system.

Revision 1.35: download - view: text, markup, annotated - select for diffs
Mon Feb 26 00:25:40 2007 UTC (17 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.34: preferred, colored
Changes since revision 1.34: +5 -0 lines
revert 1.34, as discussed with agc.  It creates more problems than
it solves, namely breaks ~all fuse file systems.  Proper fix is known
but not yet implemented.

Revision 1.34: download - view: text, markup, annotated - select for diffs
Fri Feb 23 20:51:49 2007 UTC (17 years, 9 months ago) by agc
Branches: MAIN
Diff to: previous 1.33: preferred, colored
Changes since revision 1.33: +2 -7 lines
For large directories, remove the artificial restriction on one
buffer's worth of directory entries - this work is done in the higher
level (re)fuse readdir or getdir operation.

Revision 1.33: download - view: text, markup, annotated - select for diffs
Tue Feb 20 23:49:15 2007 UTC (17 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.32: preferred, colored
Changes since revision 1.32: +7 -15 lines
* missing open is not a failure, just return 0
* nuke accidentally committed debug printf

Revision 1.32: download - view: text, markup, annotated - select for diffs
Tue Feb 20 19:13:28 2007 UTC (17 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.31: preferred, colored
Changes since revision 1.31: +3 -4 lines
reverse order of arguments to fuse->op.symlink, remove comment
suspecting argument order reversal

Revision 1.31: download - view: text, markup, annotated - select for diffs
Tue Feb 20 19:00:21 2007 UTC (17 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.30: preferred, colored
Changes since revision 1.30: +63 -38 lines
* Thread flags to VOP_OPEN (except of course O_CREAT, O_TRUNC and O_EXCL)
  through fuse_file_info to the fuse open operation.
* reference count opens for each node and do release once the count
  drops to zero (instead of waiting for inactive).  I'm still not sure
  if this exactly matches linux/fuse behaviour, but at least we do
  open when a new file descriptor is opened for each node and a do
  a release when the reference to the last file descriptor for a
  node is closed, so it ought to be pretty close

cryptofs works after these changes

Revision 1.30: download - view: text, markup, annotated - select for diffs
Tue Feb 20 14:51:52 2007 UTC (17 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.29: preferred, colored
Changes since revision 1.29: +22 -15 lines
* create a refusenode also for the root node
* opendir directories in open

Revision 1.29: download - view: text, markup, annotated - select for diffs
Mon Feb 19 23:12:29 2007 UTC (17 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.28: preferred, colored
Changes since revision 1.28: +13 -2 lines
Implement a very very stubby fuse_unmount(), which does ... nothing.
Pending some puffs changes that are in the queue, this is the best way
currently.

Revision 1.28: download - view: text, markup, annotated - select for diffs
Mon Feb 19 22:12:44 2007 UTC (17 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.27: preferred, colored
Changes since revision 1.27: +7 -14 lines
fix return-in-the-middle bug in inactive.  and while there, make
it always return 0, since the return value is not used for error
indication for the kernel

Revision 1.27: download - view: text, markup, annotated - select for diffs
Mon Feb 19 22:07:51 2007 UTC (17 years, 9 months ago) by xtraeme
Branches: MAIN
Diff to: previous 1.26: preferred, colored
Changes since revision 1.26: +4 -2 lines
puffs_fuse_node_inactive: initialize ret to 0 to avoid a warning.

Revision 1.26: download - view: text, markup, annotated - select for diffs
Mon Feb 19 22:04:26 2007 UTC (17 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.25: preferred, colored
Changes since revision 1.25: +177 -168 lines
* combine emulation layer tasks for node creation to a common routine
* make set/getattr easily callable from interface functions and sprinkle
  calls to locations which require them
* use libpuffs routine for stat->vattr translation instead of homegrown one
* I have concluded that we really want to do release/releasedir in
  inactive instead of reclaim.  make it so.  we'll tweak it for the next
  file system which decides it doesn't want to work

after these changes lzofs works, at least for most parts
(I'd assume the non-working parts to fail also on fuse/linux)

Revision 1.25: download - view: text, markup, annotated - select for diffs
Sun Feb 18 23:30:45 2007 UTC (17 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.24: preferred, colored
Changes since revision 1.24: +29 -16 lines
* don't allow reads beyond at offset = EOF, all fuse file systems can't
  handle it
* initialize refuse root node properly
* some misc cleanup

Revision 1.24: download - view: text, markup, annotated - select for diffs
Sun Feb 18 22:42:33 2007 UTC (17 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.23: preferred, colored
Changes since revision 1.23: +5 -18 lines
fix rename (yes, it's really that simple)

Revision 1.23: download - view: text, markup, annotated - select for diffs
Sun Feb 18 22:30:59 2007 UTC (17 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.22: preferred, colored
Changes since revision 1.22: +13 -8 lines
* oh, and when removing, remove the target node, not its parent directory
* use PUFFS_KFLAG_NOCACHE always for now, since code is too jumpy and
  volatile to deal with caches

Revision 1.22: download - view: text, markup, annotated - select for diffs
Sun Feb 18 22:08:42 2007 UTC (17 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.21: preferred, colored
Changes since revision 1.21: +37 -7 lines
* map reclaim to release, but call it only for files which were opened
* use node paths in remove/rmdir instead of pcn full paths (which are
  null for those ops)

Revision 1.21: download - view: text, markup, annotated - select for diffs
Sun Feb 18 20:38:07 2007 UTC (17 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.20: preferred, colored
Changes since revision 1.20: +29 -15 lines
in create, if op.create doesn't exist, try op.mknod instead

Revision 1.20: download - view: text, markup, annotated - select for diffs
Sun Feb 18 17:44:57 2007 UTC (17 years, 9 months ago) by agc
Branches: MAIN
Diff to: previous 1.19: preferred, colored
Changes since revision 1.19: +20 -2 lines
Added extra functionality:

	fuse_opt_free_args()

	fuse_exit()

Both from Juan RP - thanks!

Revision 1.19: download - view: text, markup, annotated - select for diffs
Sun Feb 18 00:01:18 2007 UTC (17 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.18: preferred, colored
Changes since revision 1.18: +63 -16 lines
support some more fuse interfaces required for setattr:
utimens, utime, truncate and ftruncate

Revision 1.18: download - view: text, markup, annotated - select for diffs
Fri Feb 16 00:35:06 2007 UTC (17 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.17: preferred, colored
Changes since revision 1.17: +22 -19 lines
* can't call unlink(2) & rmdir(2) in error paths.  Rather, call
  ops specified in the fuse op vector (or, if they're missing,
  we're SOL)
* great return value overhaul: return -ret to get linuxy -errno
  right for the kernel

Revision 1.17: download - view: text, markup, annotated - select for diffs
Fri Feb 16 00:16:39 2007 UTC (17 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.16: preferred, colored
Changes since revision 1.16: +5 -2 lines
write to end-of-file in case of IOAPPEND

Revision 1.16: download - view: text, markup, annotated - select for diffs
Fri Feb 16 00:13:02 2007 UTC (17 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.15: preferred, colored
Changes since revision 1.15: +48 -4 lines
* first stab at create
* return proper return values from read/write

Revision 1.15: download - view: text, markup, annotated - select for diffs
Thu Feb 15 21:57:09 2007 UTC (17 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.14: preferred, colored
Changes since revision 1.14: +4 -7 lines
No need to set read, readdir and write in the ops vector twice.
Pair up some ops while shuffling.

Revision 1.14: download - view: text, markup, annotated - select for diffs
Thu Feb 15 19:33:52 2007 UTC (17 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.13: preferred, colored
Changes since revision 1.13: +3 -3 lines
Readlink should place the length of the link (without terminating
nul) in the length field.  Make it so.

Revision 1.13: download - view: text, markup, annotated - select for diffs
Thu Feb 15 18:35:16 2007 UTC (17 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.12: preferred, colored
Changes since revision 1.12: +21 -17 lines
* slightly better dirfillers
* make readlink work

Revision 1.12: download - view: text, markup, annotated - select for diffs
Thu Feb 15 17:06:24 2007 UTC (17 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.11: preferred, colored
Changes since revision 1.11: +22 -9 lines
implement proper lookup

Revision 1.11: download - view: text, markup, annotated - select for diffs
Thu Feb 15 10:54:40 2007 UTC (17 years, 9 months ago) by pooka
Branches: MAIN
Diff to: previous 1.10: preferred, colored
Changes since revision 1.10: +23 -2 lines
Implement a very very hacky fuse_get_context(), needs to be visited once
threading is added (and probably otherwise also).

Revision 1.10: download - view: text, markup, annotated - select for diffs
Sun Feb 11 18:33:30 2007 UTC (17 years, 10 months ago) by pooka
Branches: MAIN
Diff to: previous 1.9: preferred, colored
Changes since revision 1.9: +2 -11 lines
link operation does not create a new node, therefore don't do it in
the code either

Revision 1.9: download - view: text, markup, annotated - select for diffs
Sun Feb 11 18:30:55 2007 UTC (17 years, 10 months ago) by pooka
Branches: MAIN
Diff to: previous 1.8: preferred, colored
Changes since revision 1.8: +4 -4 lines
need to compare against PUFFS_VNOVAL instead of 0 to determnine if
fields are valid

Revision 1.8: download - view: text, markup, annotated - select for diffs
Sun Feb 11 16:06:52 2007 UTC (17 years, 10 months ago) by pooka
Branches: MAIN
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +7 -13 lines
pass real fuse_file_info to rest of fuse ops instead of a memset-to-zero one

Revision 1.7: download - view: text, markup, annotated - select for diffs
Sun Feb 11 16:02:24 2007 UTC (17 years, 10 months ago) by pooka
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +28 -15 lines
sprinkle some KNF

agc ok

Revision 1.6: download - view: text, markup, annotated - select for diffs
Sun Feb 11 14:38:00 2007 UTC (17 years, 10 months ago) by pooka
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +2 -2 lines
fuse directory fillers return opposite truth values from puffs_nextdent,
so invert return value to make readdir callers which check the return
value work.

Revision 1.5: download - view: text, markup, annotated - select for diffs
Sun Feb 11 12:12:39 2007 UTC (17 years, 10 months ago) by pooka
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +39 -15 lines
Allocate refuse private data, refusenode, for all nodes.  Currently it
carries fuse_file_info.

.. and lo, cddafs works

Revision 1.4: download - view: text, markup, annotated - select for diffs
Sun Feb 11 11:57:41 2007 UTC (17 years, 10 months ago) by pooka
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +40 -11 lines
implement getdir, used by some older fuse file systems instead of readdir

Revision 1.3: download - view: text, markup, annotated - select for diffs
Sun Feb 11 10:58:43 2007 UTC (17 years, 10 months ago) by pooka
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +12 -11 lines
Don't release nodes in _remove or _rmdir, implement reclaim
where to do it.

Revision 1.2: download - view: text, markup, annotated - select for diffs
Sun Feb 11 10:51:53 2007 UTC (17 years, 10 months ago) by pooka
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +8 -29 lines
* sprinkle some comments to obvious XXX places
* remove outdated #ifdef from write
* return 0 if unmount is not supported instead of ENOSYS

Revision 1.1: download - view: text, markup, annotated - select for diffs
Sun Feb 11 10:31:37 2007 UTC (17 years, 10 months ago) by agc
Branches: MAIN
Add an implementation of the file system in userspace functionality,
based on top of libpuffs.  This version is still barebones and
incomplete, but will benefit from others working on it, rather than
just me.

The option code has still to be implemented, but this gets far enough
to run hellofs (from the fuse web page):

	% priv ./hellofs ~/hellofs/mnt &
	% l ~/hellofs/mnt
	total 2
	drwxr-xr-x  2 root  wheel    0 Jan  1  1970 .
	drwxr-xr-x  4 agc   agc    512 Feb  9 18:05 ..
	-r--r--r--  1 root  wheel   13 Jan  1  1970 hello
	% cat ~/hellofs/mnt/hello
	Hello World!
	% df ~/hellofs/mnt
	Filesystem           1K-blocks      Used     Avail Capacity  Mounted on
	/dev/dk0              28101396  18946682   7749646    70%    /
	kernfs                       1         1         0   100%    /kern
	procfs                       4         4         0   100%    /proc
	ptyfs                        1         1         0   100%    /dev/pts
	puffs:refuse:hellofs  28101396  18946682   7749646    70%    /home/agc/hellofs/mnt
	% mount -v -v
	...
	mount: mount_puffs not found for /home/agc/hellofs/mnt
	puffs:refuse:hellofs on /home/agc/hellofs/mnt type puffs (nosuid, nodev, fsid: 0xcb01/0x6acb, reads: sync 0 async 0, writes: sync 0 async 0)
	%

This code is not enabled by default. Yet.

Diff request

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Log view options

CVSweb <webmaster@jp.NetBSD.org>