X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fliblustre%2Ffile.c;h=85c307a3a704fee59c69d2296c484c49b5c20d28;hb=2ba2a15001b898b397c538c0545202f6cc1dff83;hp=c166ca9cafc708a863e04d93522ed2ec40abb356;hpb=7d2a94e40959a63d97ca4adc9a5d7a33511faa55;p=fs%2Flustre-release.git diff --git a/lustre/liblustre/file.c b/lustre/liblustre/file.c index c166ca9..85c307a 100644 --- a/lustre/liblustre/file.c +++ b/lustre/liblustre/file.c @@ -1,6 +1,4 @@ -/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*- - * vim:expandtab:shiftwidth=8:tabstop=8: - * +/* * GPL HEADER START * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -26,8 +24,10 @@ * GPL HEADER END */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved + * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. + * + * Copyright (c) 2011, Whamcloud, Inc. */ /* * This file is part of Lustre, http://www.lustre.org/ @@ -49,17 +49,6 @@ #include #include -#include -#ifdef HAVE_XTIO_H -#include -#endif -#include -#include -#include -#ifdef HAVE_FILE_H -#include -#endif - #include "llite_lib.h" /* Pack the required supplementary groups into the supplied groups array. @@ -114,11 +103,6 @@ void llu_prep_md_op_data(struct md_op_data *op_data, struct inode *i1, op_data->op_data = NULL; } -void llu_finish_md_op_data(struct md_op_data *op_data) -{ - OBD_FREE_PTR(op_data); -} - void obdo_refresh_inode(struct inode *dst, struct obdo *src, obd_flag valid) @@ -200,7 +184,6 @@ int llu_iop_open(struct pnode *pnode, int flags, mode_t mode) struct inode *inode = pnode->p_base->pb_ino; struct llu_inode_info *lli = llu_i2info(inode); struct intnl_stat *st = llu_i2stat(inode); - struct ll_file_data *fd; struct ptlrpc_request *request; struct lookup_intent *it; struct lov_stripe_md *lsm; @@ -231,8 +214,6 @@ int llu_iop_open(struct pnode *pnode, int flags, mode_t mode) if (!S_ISREG(st->st_mode)) GOTO(out_release, rc = 0); - fd = lli->lli_file_data; - lsm = lli->lli_smd; if (lsm) flags &= ~O_LOV_DELAY_CREATE; @@ -304,10 +285,10 @@ int llu_objects_destroy(struct ptlrpc_request *req, struct inode *dir) GOTO(out_free_memmd, rc = -ENOMEM); oa->o_id = lsm->lsm_object_id; - oa->o_gr = lsm->lsm_object_gr; + oa->o_seq = lsm->lsm_object_seq; oa->o_mode = body->mode & S_IFMT; oa->o_valid = OBD_MD_FLID | OBD_MD_FLTYPE | OBD_MD_FLGROUP; - + obdo_set_parent_fid(oa, &llu_i2info(dir)->lli_fid); if (body->valid & OBD_MD_FLCOOKIE) { oa->o_valid |= OBD_MD_FLCOOKIE; oti.oti_logcookies = @@ -321,7 +302,7 @@ int llu_objects_destroy(struct ptlrpc_request *req, struct inode *dir) } } - rc = obd_destroy(llu_i2obdexp(dir), oa, lsm, &oti, NULL, NULL); + rc = obd_destroy(NULL, llu_i2obdexp(dir), oa, lsm, &oti, NULL, NULL); OBDO_FREE(oa); if (rc) CERROR("obd destroy objid 0x"LPX64" error %d\n",