X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=drivers%2Fstaging%2Flustre%2Flustre%2Fllite%2Fllite_lib.c;h=e0d8f15fe4fd24c9051961fb8f8f40a53298ed38;hb=55f5a824b9e727eb159905475028d3cb52370276;hp=deca27ea33fea1c95fb1d8fa78e7f9d505ffc9d0;hpb=859862ddd2b6b8dee00498c015ab37f02474b442;p=linux-2.6-block.git diff --git a/drivers/staging/lustre/lustre/llite/llite_lib.c b/drivers/staging/lustre/lustre/llite/llite_lib.c index deca27ea33fe..e0d8f15fe4fd 100644 --- a/drivers/staging/lustre/lustre/llite/llite_lib.c +++ b/drivers/staging/lustre/lustre/llite/llite_lib.c @@ -44,15 +44,15 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include "../include/lustre_lite.h" +#include "../include/lustre_ha.h" +#include "../include/lustre_dlm.h" +#include "../include/lprocfs_status.h" +#include "../include/lustre_disk.h" +#include "../include/lustre_param.h" +#include "../include/lustre_log.h" +#include "../include/cl_object.h" +#include "../include/obd_cksum.h" #include "llite_internal.h" struct kmem_cache *ll_file_data_slab; @@ -426,7 +426,7 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt, if (sbi->ll_flags & LL_SBI_RMT_CLIENT) data->ocd_connect_flags |= OBD_CONNECT_RMT_CLIENT_FORCE; - CDEBUG(D_RPCTRACE, "ocd_connect_flags: "LPX64" ocd_version: %d " + CDEBUG(D_RPCTRACE, "ocd_connect_flags: %#llx ocd_version: %d " "ocd_grant: %d\n", data->ocd_connect_flags, data->ocd_version, data->ocd_grant); @@ -1296,7 +1296,7 @@ static int ll_setattr_done_writing(struct inode *inode, if (!S_ISREG(inode->i_mode)) return 0; - CDEBUG(D_INODE, "Epoch "LPU64" closed on "DFID" for truncate\n", + CDEBUG(D_INODE, "Epoch %llu closed on "DFID" for truncate\n", op_data->op_ioepoch, PFID(&lli->lli_fid)); op_data->op_flags = MF_EPOCH_CLOSE; @@ -1377,7 +1377,7 @@ int ll_setattr_raw(struct dentry *dentry, struct iattr *attr, bool hsm_import) * OST maximum object size and number of stripes. This * needs another check in addition to the VFS check above. */ if (attr->ia_size > ll_file_maxbytes(inode)) { - CDEBUG(D_INODE,"file "DFID" too large %llu > "LPU64"\n", + CDEBUG(D_INODE,"file "DFID" too large %llu > %llu\n", PFID(&lli->lli_fid), attr->ia_size, ll_file_maxbytes(inode)); return -EFBIG; @@ -1412,7 +1412,7 @@ int ll_setattr_raw(struct dentry *dentry, struct iattr *attr, bool hsm_import) if (attr->ia_valid & (ATTR_MTIME | ATTR_CTIME)) CDEBUG(D_INODE, "setting mtime %lu, ctime %lu, now = %lu\n", LTIME_S(attr->ia_mtime), LTIME_S(attr->ia_ctime), - cfs_time_current_sec()); + get_seconds()); /* If we are changing file size, file content is modified, flag it. */ if (attr->ia_valid & ATTR_SIZE) { @@ -1537,12 +1537,14 @@ int ll_setattr(struct dentry *de, struct iattr *attr) !(attr->ia_mode & S_ISGID)))) attr->ia_valid |= ATTR_FORCE; - if ((mode & S_ISUID) && + if ((attr->ia_valid & ATTR_MODE) && + (mode & S_ISUID) && !(attr->ia_mode & S_ISUID) && !(attr->ia_valid & ATTR_KILL_SUID)) attr->ia_valid |= ATTR_KILL_SUID; - if (((mode & (S_ISGID|S_IXGRP)) == (S_ISGID|S_IXGRP)) && + if ((attr->ia_valid & ATTR_MODE) && + ((mode & (S_ISGID|S_IXGRP)) == (S_ISGID|S_IXGRP)) && !(attr->ia_mode & S_ISGID) && !(attr->ia_valid & ATTR_KILL_SGID)) attr->ia_valid |= ATTR_KILL_SGID; @@ -1565,7 +1567,7 @@ int ll_statfs_internal(struct super_block *sb, struct obd_statfs *osfs, osfs->os_type = sb->s_magic; - CDEBUG(D_SUPER, "MDC blocks "LPU64"/"LPU64" objects "LPU64"/"LPU64"\n", + CDEBUG(D_SUPER, "MDC blocks %llu/%llu objects %llu/%llu\n", osfs->os_bavail, osfs->os_blocks, osfs->os_ffree,osfs->os_files); if (sbi->ll_flags & LL_SBI_LAZYSTATFS) @@ -1577,7 +1579,7 @@ int ll_statfs_internal(struct super_block *sb, struct obd_statfs *osfs, return rc; } - CDEBUG(D_SUPER, "OSC blocks "LPU64"/"LPU64" objects "LPU64"/"LPU64"\n", + CDEBUG(D_SUPER, "OSC blocks %llu/%llu objects %llu/%llu\n", obd_osfs.os_bavail, obd_osfs.os_blocks, obd_osfs.os_ffree, obd_osfs.os_files); @@ -1604,7 +1606,7 @@ int ll_statfs(struct dentry *de, struct kstatfs *sfs) struct obd_statfs osfs; int rc; - CDEBUG(D_VFSTRACE, "VFS Op: at "LPU64" jiffies\n", get_jiffies_64()); + CDEBUG(D_VFSTRACE, "VFS Op: at %llu jiffies\n", get_jiffies_64()); ll_stats_ops_tally(ll_s2sbi(sb), LPROC_LL_STAFS, 1); /* Some amount of caching on the client is allowed */ @@ -1697,9 +1699,9 @@ void ll_update_inode(struct inode *inode, struct lustre_md *md) } if (body->valid & OBD_MD_FLMTIME) { if (body->mtime > LTIME_S(inode->i_mtime)) { - CDEBUG(D_INODE, "setting ino %lu mtime from %lu " - "to "LPU64"\n", inode->i_ino, - LTIME_S(inode->i_mtime), body->mtime); + CDEBUG(D_INODE, "setting ino %lu mtime from %lu to %llu\n", + inode->i_ino, LTIME_S(inode->i_mtime), + body->mtime); LTIME_S(inode->i_mtime) = body->mtime; } lli->lli_lvb.lvb_mtime = body->mtime; @@ -1997,7 +1999,7 @@ void ll_umount_begin(struct super_block *sb) obd = class_exp2obd(sbi->ll_md_exp); if (obd == NULL) { - CERROR("Invalid MDC connection handle "LPX64"\n", + CERROR("Invalid MDC connection handle %#llx\n", sbi->ll_md_exp->exp_handle.h_cookie); return; } @@ -2005,7 +2007,7 @@ void ll_umount_begin(struct super_block *sb) obd = class_exp2obd(sbi->ll_dt_exp); if (obd == NULL) { - CERROR("Invalid LOV connection handle "LPX64"\n", + CERROR("Invalid LOV connection handle %#llx\n", sbi->ll_dt_exp->exp_handle.h_cookie); return; } @@ -2245,7 +2247,7 @@ struct md_op_data * ll_prep_md_op_data(struct md_op_data *op_data, op_data->op_name = name; op_data->op_namelen = namelen; op_data->op_mode = mode; - op_data->op_mod_time = cfs_time_current_sec(); + op_data->op_mod_time = get_seconds(); op_data->op_fsuid = from_kuid(&init_user_ns, current_fsuid()); op_data->op_fsgid = from_kgid(&init_user_ns, current_fsgid()); op_data->op_cap = cfs_curproc_cap_pack();