• R/O
  • SSH
  • HTTPS

perl-fuse-fv: Commit


Commit MetaInfo

Revision69 (tree)
Zeit2011-06-11 17:54:12
Autortofjw

Log Message

documentation reached to the fsync method.

Ändern Zusammenfassung

Diff

--- Fuse-Class/trunk/lib/Fuse/Class.pm (revision 68)
+++ Fuse-Class/trunk/lib/Fuse/Class.pm (revision 69)
@@ -49,7 +49,11 @@
4949 my $fuse = SampleFS->new("your", "parameters", "here");
5050 $fuse->main(mountpoint => '/mnt/sample', mountopts => "allow_other");
5151
52+When file on your filesystem is opened it will be seen that method
53+is called like this:
5254
55+ $fuse->open($path_name, $flags, $file_info);
56+
5357 =head1 DESCRIPTION
5458
5559 This module supports writing Fuse callback as method.
@@ -63,7 +67,7 @@
6367 Return value will be treated as errno in Fuse way, but you can use
6468 exception, too.
6569 If exception is thrown in your method (die is called), $! will be used
66-as errno to notify error to Fuse.
70+as errno to notify error to Fuse.
6771
6872
6973 =head1 EXPORT
@@ -320,9 +324,22 @@
320324
321325 =head2 statfs
322326
323-Same as Fuse. By default implementation, returns -ENOANO.
324-You can leave this method if your FS does not have statfs.
327+Returns status of filesystem accoding to one of follwing style:
325328
329+=over
330+
331+=item -ENOANO()
332+
333+or
334+
335+=item $namelen, $files, $files_free, $blocks, $blocks_avail, $blocksize
336+
337+or
338+
339+=item -ENOANO(), $namelen, $files, $files_free, $blocks, $blocks_avail, $blocksize
340+
341+=back
342+
326343 =cut
327344
328345 sub statfs {
@@ -329,12 +346,11 @@
329346 return -Errno::ENOANO();
330347 }
331348
349+=head2 flush(PATH_NAME, FILE_HANDLE)
332350
333-=head2 flush
351+Returns an errno (0 if success).
352+This method is called to synchronize any cached data.
334353
335-Same as Fuse. By default implementation, returns 0.
336-You can leave this method if your FS does not have flush.
337-
338354 =cut
339355
340356 sub flush {
@@ -341,11 +357,14 @@
341357 return 0;
342358 }
343359
344-=head2 release
360+=head2 release(PATH_NAME, FLAGS, FILE_HANDLE)
345361
346-Same as Fuse. By default implementation, returns 0.
347-You can leave this method if your FS does not need anything when releaing.
362+Return an errno (0 if success).
348363
364+FLAGS is a same value passed when 'open' is called.
365+
366+Called to indicate that there are no more references to the file and flags.
367+
349368 =cut
350369
351370 sub release {
@@ -352,11 +371,16 @@
352371 return 0;
353372 }
354373
355-=head2 fsync
374+=head2 fsync(PATH_NAME, DATA_SYNC, FILE_HANDLE)
356375
357-Same as Fuse. By default implementation, returns 0.
358-You can leave this method if your FS does not have fsync.
376+Return an errno (0 if success).
359377
378+Called to synchronize file contents.
379+
380+DATA_SYNC indicates 'user data only'. If DATA_SYNC is non-zero,
381+only the user data should be synchronized. Otherwise synchronize
382+user and meta data.
383+
360384 =cut
361385
362386 sub fsync {
@@ -363,9 +387,14 @@
363387 return 0;
364388 }
365389
366-=head2 setxattr
390+=head2 setxattr(PATH_NAME, ATTR_NAME, ATTR_VALUE, FLAGS)
367391
368-Same as Fuse. By default implementation, returns -ENOATTR.
392+Returns an errno, and a file handle (optional)
393+
394+This method is called to read data (SIZE bytes)
395+at the given offset of opened file.
396+
397+By default implementation, returns -EOPNOTSUPP.
369398 You can leave this method if your FS does not have any extended attrs.
370399
371400 =cut
Show on old repository browser