Return-Path: william@bourbon.usc.edu Delivery-Date: Sun Nov 16 20:06:58 2008 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on merlot.usc.edu X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.3 Received: from bourbon.usc.edu (bourbon.usc.edu [128.125.9.75]) by merlot.usc.edu (8.14.1/8.14.1) with ESMTP id mAH46weY029367 for ; Sun, 16 Nov 2008 20:06:58 -0800 Received: from bourbon.usc.edu (localhost.localdomain [127.0.0.1]) by bourbon.usc.edu (8.14.2/8.14.1) with ESMTP id mAH43LGU016820 for ; Sun, 16 Nov 2008 20:03:21 -0800 Message-Id: <200811170403.mAH43LGU016820@bourbon.usc.edu> To: cs551@merlot.usc.edu Subject: Re: Storage Space Date: Sun, 16 Nov 2008 20:03:21 -0800 From: Bill Cheng Someone wrote: > The spec says that if there is not enough space in the system, then the > file should be discarded (when in permanent storage) or LRU is used > (when in cache). > I have a doubt here: > While receiving a file in store, I temporarily store the file in my CWD > and at the time of probabilistically deciding if I need to store the > file, I move it to my files dir. > And then delete this temporary copy of the file. > Now, what if there is space in the files dir but not enough space in the > CWD ? > What should I do in that case? First of all, it's never a good idea to create temporary files in the current working directory (CWD)! For temporary files, you should either create it in /tmp or you can have a tmp subdirectory under HomeDir. If you cannot create a temporary file, you should give up on saving a copy of the temporary file. -- Bill Cheng // bill.cheng@usc.edu