The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/fs/intermezzo/journal_tmpfs.c

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
    2  * vim:expandtab:shiftwidth=8:tabstop=8:
    3  *
    4  *  Copyright (C) 1998 Peter J. Braam <braam@clusterfs.com>
    5  *  Copyright (C) 2000 Red Hat, Inc.
    6  *  Copyright (C) 2000 Los Alamos National Laboratory
    7  *  Copyright (C) 2000 TurboLinux, Inc.
    8  *  Copyright (C) 2001 Mountain View Data, Inc.
    9  *  Copyright (C) 2001 Tacit Networks, Inc. <phil@off.net>
   10  *
   11  *   This file is part of InterMezzo, http://www.inter-mezzo.org.
   12  *
   13  *   InterMezzo is free software; you can redistribute it and/or
   14  *   modify it under the terms of version 2 of the GNU General Public
   15  *   License as published by the Free Software Foundation.
   16  *
   17  *   InterMezzo is distributed in the hope that it will be useful,
   18  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
   19  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   20  *   GNU General Public License for more details.
   21  *
   22  *   You should have received a copy of the GNU General Public License
   23  *   along with InterMezzo; if not, write to the Free Software
   24  *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
   25  */
   26 
   27 #include <linux/types.h>
   28 #include <linux/param.h>
   29 #include <linux/kernel.h>
   30 #include <linux/sched.h>
   31 #include <linux/fs.h>
   32 #include <linux/slab.h>
   33 #include <linux/vmalloc.h>
   34 #include <linux/stat.h>
   35 #include <linux/errno.h>
   36 #include <linux/locks.h>
   37 #include <asm/segment.h>
   38 #include <asm/uaccess.h>
   39 #include <linux/string.h>
   40 #include <linux/smp_lock.h>
   41 #if defined(CONFIG_TMPFS)
   42 #include <linux/jbd.h>
   43 #if defined(CONFIG_EXT3)
   44 #include <linux/ext3_fs.h>
   45 #include <linux/ext3_jbd.h>
   46 #endif
   47 #endif
   48 
   49 #include <linux/intermezzo_fs.h>
   50 #include <linux/intermezzo_psdev.h>
   51 
   52 #if defined(CONFIG_TMPFS)
   53 
   54 /* space requirements: 
   55    presto_do_truncate: 
   56         used to truncate the KML forward to next fset->chunksize boundary
   57           - zero partial block
   58           - update inode
   59    presto_write_record: 
   60         write header (< one block) 
   61         write one path (< MAX_PATHLEN) 
   62         possibly write another path (< MAX_PATHLEN)
   63         write suffix (< one block) 
   64    presto_update_last_rcvd
   65         write one block
   66 */
   67 
   68 static loff_t presto_tmpfs_freespace(struct presto_cache *cache,
   69                                          struct super_block *sb)
   70 {
   71         return (1<<30);
   72 }
   73 
   74 /* start the filesystem journal operations */
   75 static void *presto_tmpfs_trans_start(struct presto_file_set *fset, 
   76                                    struct inode *inode, 
   77                                    int op)
   78 {
   79         return (void *)1; 
   80 }
   81 
   82 static void presto_tmpfs_trans_commit(struct presto_file_set *fset, void *handle)
   83 {
   84         return;
   85 }
   86 
   87 static void presto_tmpfs_journal_file_data(struct inode *inode)
   88 {
   89         return; 
   90 }
   91 
   92 /* The logic here is a slightly modified version of ext3/inode.c:block_to_path
   93  */
   94 static int presto_tmpfs_has_all_data(struct inode *inode)
   95 {
   96         return 0;
   97 }
   98 
   99 struct journal_ops presto_tmpfs_journal_ops = {
  100         tr_all_data: presto_tmpfs_has_all_data,
  101         tr_avail: presto_tmpfs_freespace,
  102         tr_start:  presto_tmpfs_trans_start,
  103         tr_commit: presto_tmpfs_trans_commit,
  104         tr_journal_data: presto_tmpfs_journal_file_data,
  105         tr_ilookup: presto_tmpfs_ilookup,
  106         tr_add_ilookup: presto_add_ilookup_dentry
  107 };
  108 
  109 #endif /* CONFIG_EXT3_FS */

Cache object: 647837c35eed95fb475e56a9482a25c6


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.