From d702d00ab439159e3f125cfa5e9fa94b048b3397 Mon Sep 17 00:00:00 2001
From: yuan-zhou <yuan.zhou@intel.com>
Date: Mon, 26 Nov 2012 15:20:39 +0800
Subject: [PATCH] Don't segment objects smaller than --segment-size

Fix bug 1075184

Change-Id: I369e742ca802744ac20e3575828cfa881018de6d
---
 bin/swift | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/bin/swift b/bin/swift
index 267744a7..57607309 100755
--- a/bin/swift
+++ b/bin/swift
@@ -845,8 +845,9 @@ def st_upload(parser, args, print_queue, error_queue):
                     except ClientException, err:
                         if err.http_status != 404:
                             raise
+                # Don't do segment job if object is not big enough
                 if options.segment_size and \
-                        getsize(path) < options.segment_size:
+                        getsize(path) > int(options.segment_size):
                     full_size = getsize(path)
                     segment_queue = Queue(10000)
                     segment_threads = [QueueFunctionThread(segment_queue,