aboutsummaryrefslogtreecommitdiffstats
path: root/net/ceph/osdmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ceph/osdmap.c')
-rw-r--r--net/ceph/osdmap.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/net/ceph/osdmap.c b/net/ceph/osdmap.c
index 3faa9e701518..e3ebbe2ecdad 100644
--- a/net/ceph/osdmap.c
+++ b/net/ceph/osdmap.c
@@ -2153,9 +2153,9 @@ bool ceph_osds_changed(const struct ceph_osds *old_acting,
* objno | 0 | 1 | 2 | 3 | 4
* objsetno | 0 | 1
*/
-int ceph_calc_file_object_mapping(struct ceph_file_layout *l,
+void ceph_calc_file_object_mapping(struct ceph_file_layout *l,
u64 off, u64 len,
- u64 *objno, u64 *objoff, u64 *xlen)
+ u64 *objno, u64 *objoff, u32 *xlen)
{
u32 stripes_per_object = l->object_size / l->stripe_unit;
u64 blockno; /* which su in the file (i.e. globally) */
@@ -2173,8 +2173,6 @@ int ceph_calc_file_object_mapping(struct ceph_file_layout *l,
*objno = objsetno * l->stripe_count + stripepos;
*objoff = objsetpos * l->stripe_unit + blockoff;
*xlen = min_t(u64, len, l->stripe_unit - blockoff);
-
- return 0;
}
EXPORT_SYMBOL(ceph_calc_file_object_mapping);
Change how "cp -a" and "cp --preserve=context" work with SELinux. Now, cp -a attempts to preserve context, but failure to do so does not change cp's exit status. However "cp --preserve=context" is similar, but failure *does* cause cp to exit with nonzero status. * src/copy.h (struct cp_options) [require_preserve_context]: New member. * src/copy.c (copy_reg, copy_internal): Implement the above. * src/mv.c (cp_option_init): Initialize the new member. * src/install.c (cp_option_init): Likewise. * src/cp.c (cp_option_init): Likewise. (decode_preserve_arg): Set it or reset it. FIXME: add an on-writable-NFS-only test 2007-03-18* src/system.h (GETOPT_SELINUX_CONTEXT_OPTION_DECL): Define.Jim Meyering2-0/+3 2007-03-18cp, mv, install: add SELinux support, but unlike with the Red HatJim Meyering7-15/+243 patch, mv and cp do not provide the "-Z context" option. * src/copy.c: Include <selinux/selinux.h>. (restore_default_fscreatecon): New function. (copy_reg): Make cp --preserve=context work for existing destination. (copy_internal): Likewise for new destinations. * src/copy.h (cp_options) [preserve_security_context]: New member. * src/cp.c: Include <selinux/selinux.h>. (selinux_enabled): New global. (usage): Mention new --preserve=context option. (PRESERVE_CONTEXT): Define/use. (decode_preserve_arg): Handle PRESERVE_CONTEXT. (main): Remove an obsolete comment. If --preserve=context is specified on a system without SELinux enabled, give a diagnostic and fail. * src/mv.c: Include <selinux/selinux.h>. Set x->preserve_security_context if SELinux is enabled. * src/install.c: Accept new "-Z, --context=C" option. Accept --preserve-context option (but not -P option). Accept alternate spelling: --preserve_context, for now. Include <selinux/selinux.h> and "quotearg.h". (selinux_enabled, use_default_selinux_context): New globals. (PRESERVE_CONTEXT_OPTION): Define. (cp_option_init): Default: do not preserve security context. (setdefaultfilecon): New function. (main): Honor new options. * src/Makefile.am (mv_LDADD, cp_LDADD, ginstall_LDADD): Add $(LIB_SELINUX). 2007-03-18* tests/misc/selinux [VERBOSE]: Print version info for eachJim Meyering2-0/+7 of the tested tools, not just ls. 2007-03-18* src/c99-to-c89.diff: Remove the ls.c patch, now that I'veJim Meyering2-20/+3 temporarily removed the offending c99'ism. 2007-03-18* src/chcon.c (usage): Split a string literal that was longer than 509.Jim Meyering2-0/+4 2007-03-18* src/ls.c (gobble_file): Don't call getfilecon unless print_scontext.Jim Meyering2-3/+7 Upon failed getfilecon, accept not just ENOTSUP, but also ENODATA. 2007-03-18* src/c99-to-c89.diff: Adjust offsets.Jim Meyering2-2/+4 2007-03-18* AUTHORS: Add chcon.Jim Meyering2-0/+3 2007-03-18* src/c99-to-c89.diff: Remove trailing blanks.Jim Meyering2-4/+6 2007-03-18* src/chcon.c: Don't include "dirname.h". system.h already includes it.Jim Meyering2-1/+2 2007-03-18* gl/lib/selinux-at.c: Remove a use of HAVE_CONFIG_H.Jim Meyering2-3/+3 2007-03-18* src/c99-to-c89.diff: Handle a new c99'ism in ls.c.Jim Meyering2-0/+22 2007-03-18* src/id.c (main): Tweak id -Z diagnostic.Jim Meyering2-2/+4 2007-03-18* POTFILES.in: Add src/chcon.c.Jim Meyering2-1/+6 2007-03-18id: Add SELinux support: -Z option.Jim Meyering3-10/+62 * src/id.c (main): Apply patches from Fedora, with these changes: Remove #ifdef WITH_SELINUX. Use error (EXIT_FAILURE, not fprintf+exit(1). * src/Makefile.am (id_LDADD): Define, so as to add $(LIB_SELINUX).