• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Is cloning the same as copying in APFS?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Is cloning the same as copying in APFS?


  • Subject: Re: Is cloning the same as copying in APFS?
  • From: Sandor Szatmari <email@hidden>
  • Date: Mon, 26 Jun 2017 23:00:03 -0400

> On Jun 26, 2017, at 22:45, Quincey Morris
> <email@hidden> wrote:
>
>> On Jun 26, 2017, at 19:17 , Sandor Szatmari <email@hidden>
>> wrote:
>>
>> Are you talking about just a regular old copy or a copy in the sense of a
>> time machine backup?  Are these behaviors different on APFS?
>
> Yes and no. A regular old copy will create metadata for a new file, and point
> back to the data blocks of the copied file. A time machine backup will create
> a snapshot, which is effect a copy of all the metadata in the volume, with
> the same shared pointers to the data blocks.

Yes, I felt the description of the copy on write behavior was intended to be
universal to all copy operations not just a special operation reserved for time
machine.  But, my even more admittedly vague understanding did not allow me to
confidently draw a distinction be tween the two.  Thank you for tipping the
scales.

>
> In both cases, the functionality relies on the copy-on-write behavior, which
> works at the data block level, not the file level.
Yes, this is very nice...
> (The latter point is worth keeping in mind, because it means that deleting
> files in APFS may not recover all of the file’s size into free space.)
The ADC video stresses this point several times.

>
>> On Jun 26, 2017, at 19:38 , Rick Mann <email@hidden> wrote:
>>
>> But there's actually a POSIX "clone" API, and so I wonder if a copy is
>> different from a clone.
>
> My (admittedly vague) understanding is that all file system copy operations
> are expected to be clones. I would imagine the difference between the APIs to
> be that a “copy" will do a traditional duplication if the source file is
> uncloneable (e.g. on a non-APFS volume), but the “clone” would fail.
>
> But it would be a big hole if existing apps that copy items didn’t get the
> cloning behavior by default.
>
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Is cloning the same as copying in APFS? (From: Rick Mann <email@hidden>)
 >Re: Is cloning the same as copying in APFS? (From: Sandor Szatmari <email@hidden>)
 >Re: Is cloning the same as copying in APFS? (From: Quincey Morris <email@hidden>)

  • Prev by Date: Re: Is cloning the same as copying in APFS?
  • Next by Date: Re: file encription/decriptoin iOS
  • Previous by thread: Re: Is cloning the same as copying in APFS?
  • Next by thread: Re: Focus ring of NSComboBox and text field visible through overlaid views
  • Index(es):
    • Date
    • Thread