Giter Club home page Giter Club logo

tux3's People

Contributors

cdkamat avatar geosone avatar jfietz avatar kushaldalmia avatar macan avatar ogawahirofumi avatar pranith avatar rhinovirus avatar shentino avatar terrop avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tux3's Issues

unable to build the kernel module on kernel v3.12.9

When trying to build hirofumi branch, I get,


$ git rev-parse HEAD
103165788d5523414226320211d4518401af1fe9

$ make
make -C /lib/modules/`uname -r`/build/ M=`pwd` CONFIG_TUX3=m modules
make[1]: Entering directory `/usr/src/kernels/3.12.9-301.fc20.x86_64'
  CC [M]  /repos/tux3/user/kernel/buffer.o
In file included from /repos/tux3/user/kernel/buffer.c:261:0:
/repos/tux3/user/kernel/buffer_fork.c: In function ‘newpage_add_lru’:
/repos/tux3/user/kernel/buffer_fork.c:361:3: error: too many arguments to function ‘__lru_cache_add’
   __lru_cache_add(page, LRU_ACTIVE_FILE);
   ^
In file included from /repos/tux3/user/kernel/buffer_fork.c:6:0,
                 from /repos/tux3/user/kernel/buffer.c:261:
include/linux/swap.h:275:13: note: declared here
 extern void __lru_cache_add(struct page *);
             ^
In file included from /repos/tux3/user/kernel/buffer.c:261:0:
/repos/tux3/user/kernel/buffer_fork.c:363:3: error: too many arguments to function ‘__lru_cache_add’
   __lru_cache_add(page, LRU_INACTIVE_FILE);
   ^
In file included from /repos/tux3/user/kernel/buffer_fork.c:6:0,
                 from /repos/tux3/user/kernel/buffer.c:261:
include/linux/swap.h:275:13: note: declared here
 extern void __lru_cache_add(struct page *);
             ^
make[2]: *** [/repos/tux3/user/kernel/buffer.o] Error 1
make[1]: *** [_module_/repos/tux3/user/kernel] Error 2
make[1]: Leaving directory `/usr/src/kernels/3.12.9-301.fc20.x86_64'
make: *** [all] Error 2

Here is a partial patch (I have absolutely no idea about this code and got stuck),

diff --git a/user/kernel/buffer_fork.c b/user/kernel/buffer_fork.c
index 867471e..1c9a1c3 100644
--- a/user/kernel/buffer_fork.c
+++ b/user/kernel/buffer_fork.c
@@ -357,10 +357,7 @@ static void oldpage_try_remove_from_lru(struct page *page)
 /* Schedule to add LRU list */
 static void newpage_add_lru(struct page *page)
 {
-   if (TestClearPageActive(page))
-       __lru_cache_add(page, LRU_ACTIVE_FILE);
-   else
-       __lru_cache_add(page, LRU_INACTIVE_FILE);
+   __lru_cache_add(page);
 }

 enum ret_needfork {
diff --git a/user/kernel/dir.c b/user/kernel/dir.c
index 0c75c54..314e1bb 100644
--- a/user/kernel/dir.c
+++ b/user/kernel/dir.c
@@ -273,7 +273,8 @@ static unsigned char filetype[TUX_TYPES] = {
    [TUX_LNK] = DT_LNK,
 };

-int tux_readdir(struct file *file, void *state, filldir_t filldir)
+// int tux_readdir(struct file *file, void *state, filldir_t filldir)
+int tux_readdir(struct file *file, void *state, struct dir_context *ctx)
 {
    loff_t pos = file->f_pos;
    struct inode *dir = file_inode(file);
diff --git a/user/kernel/filemap.c b/user/kernel/filemap.c
index db60c79..a63bf49 100644
--- a/user/kernel/filemap.c
+++ b/user/kernel/filemap.c
@@ -973,7 +973,7 @@ static void tux3_write_failed(struct address_space *mapping, loff_t to)
         *
         * FIXME: right?
         */
-       truncate_pagecache(inode, to, inode->i_size);
+       truncate_pagecache(inode, inode->i_size);
    }
 }

diff --git a/user/kernel/filemap_blocklib.c b/user/kernel/filemap_blocklib.c
index c85cd56..3dc306d 100644
--- a/user/kernel/filemap_blocklib.c
+++ b/user/kernel/filemap_blocklib.c
@@ -360,8 +360,10 @@ void tux3_try_cancel_dirty_page(struct page *page)
  *
  * Caller must hold lock_page().
  */
-static void tux3_invalidatepage(struct page *page, unsigned long offset)
+static void tux3_invalidatepage(struct page *page, unsigned int offset,
+               unsigned int length)
 {
+
    struct buffer_head *head, *bh, *next;
    unsigned int curr_off = 0;
    int has_dirty = 0;
@@ -571,7 +573,7 @@ zero_fill_page:
    zero_user_segment(page, offset, PAGE_CACHE_SIZE);
    cleancache_invalidate_page(mapping, page);
    if (invalid_from && page_has_buffers(page))
-       mapping->a_ops->invalidatepage(page, invalid_from);
+       mapping->a_ops->invalidatepage(page, 0, invalid_from);

    err = 0;

diff --git a/user/kernel/inode.c b/user/kernel/inode.c
index 87cfaac..e3ff1d1 100644
--- a/user/kernel/inode.c
+++ b/user/kernel/inode.c
@@ -627,7 +627,7 @@ static int tux3_truncate(struct inode *inode, loff_t newsize)
     * truncate_pagecache() */
    tux3_truncate_inode_pages_range(inode->i_mapping, holebegin, LLONG_MAX);
 #endif
-   truncate_pagecache(inode, oldsize, holebegin);
+   truncate_pagecache(inode, holebegin);

    if (!is_expand) {
        err = tux3_add_truncate_hole(inode, newsize);
diff --git a/user/kernel/namei.c b/user/kernel/namei.c
index 4b77eab..7108263 100644
--- a/user/kernel/namei.c
+++ b/user/kernel/namei.c
@@ -347,7 +347,8 @@ error:
 const struct file_operations tux_dir_fops = {
    .llseek     = generic_file_llseek,
    .read       = generic_read_dir,
-   .readdir    = tux_readdir,
+   // .readdir = tux_readdir,
+   .iterate    = tux_readdir,
    .fsync      = tux3_sync_file,
 };

Can we get it building again on recent kernels? I can shift to v3.13.x for testing.

Tux3 fails to build with GCC 4.7.2

Tux3 fails to build on Arch Linux 64-bit system which uses GCC 4.7.2

$ make
/usr/include/features.h:330:4: error: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Werror=cpp]
cc1: all warnings being treated as errors
make: *** [tests/balloc.o] Error 1

The following patch "fixes" the compilation problem but may not be suitable.

$ git diff
diff --git a/user/Makefile b/user/Makefile
index 64e15f2..3935601 100644
--- a/user/Makefile
+++ b/user/Makefile
@@ -12,7 +12,7 @@ ifeq ($(ARCH),i686)
 CFLAGS += -m32
 endif

-CFLAGS += -std=gnu99 -Wall -g -rdynamic -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
+CFLAGS += -std=gnu99 -Wall -g -O1 -rdynamic -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
 CFLAGS += -I$(TOPDIR)
 # gcc warning options
 CFLAGS += -Wall -Wextra -Werror

want to contribute

Hi,

I am interested in contributing towards development of tux3. I have previously worked on ext3 filesystem so bit familiar with file systems. Please let me know how I can be of any help.

Regards.

Feature request: simple, efficient mirroring of snapshots between tux3 filesystems

I hope you don't mind me posting this here instead of on the mailing list..
And I apologise if this feature is really outside of the scope of Tux3.

btrfs send allows snapshots to mirrored between filesystems, but it's rather clunky for the simple use case of making efficient, incremental mirrors onto portable hard drives. I know that some purists might roll their eyes and make comments about real backups using tape, but this would still be a very useful feature for home users wanting to make backups to (an alternating pair of) portable hard drives (which might be kept off-site most of the time).

If this feature could be implemented in Tux3 I'm sure it would prove very useful.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.