/*1* Copyright (C) 2005, 20062* Avishay Traeger ([email protected])3* Copyright (C) 2008, 20094* Boaz Harrosh <[email protected]>5*6* Copyrights for code taken from ext2:7* Copyright (C) 1992, 1993, 1994, 19958* Remy Card ([email protected])9* Laboratoire MASI - Institut Blaise Pascal10* Universite Pierre et Marie Curie (Paris VI)11* from12* linux/fs/minix/inode.c13* Copyright (C) 1991, 1992 Linus Torvalds14*15* This file is part of exofs.16*17* exofs is free software; you can redistribute it and/or modify18* it under the terms of the GNU General Public License as published by19* the Free Software Foundation. Since it is based on ext2, and the only20* valid version of GPL for the Linux kernel is version 2, the only valid21* version of GPL for exofs is version 2.22*23* exofs is distributed in the hope that it will be useful,24* but WITHOUT ANY WARRANTY; without even the implied warranty of25* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the26* GNU General Public License for more details.27*28* You should have received a copy of the GNU General Public License29* along with exofs; if not, write to the Free Software30* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA31*/32#include "exofs.h"3334static int exofs_release_file(struct inode *inode, struct file *filp)35{36return 0;37}3839/* exofs_file_fsync - flush the inode to disk40*41* Note, in exofs all metadata is written as part of inode, regardless.42* The writeout is synchronous43*/44static int exofs_file_fsync(struct file *filp, int datasync)45{46int ret;4748ret = sync_inode_metadata(filp->f_mapping->host, 1);49return ret;50}5152static int exofs_flush(struct file *file, fl_owner_t id)53{54int ret = vfs_fsync(file, 0);55/* TODO: Flush the OSD target */56return ret;57}5859const struct file_operations exofs_file_operations = {60.llseek = generic_file_llseek,61.read = do_sync_read,62.write = do_sync_write,63.aio_read = generic_file_aio_read,64.aio_write = generic_file_aio_write,65.mmap = generic_file_mmap,66.open = generic_file_open,67.release = exofs_release_file,68.fsync = exofs_file_fsync,69.flush = exofs_flush,70.splice_read = generic_file_splice_read,71.splice_write = generic_file_splice_write,72};7374const struct inode_operations exofs_file_inode_operations = {75.setattr = exofs_setattr,76};777879